Skip to content

BUG: createElement not accepting first argument as function #7883

Closed
@manico

Description

@manico

Version

2.5.13

Reproduction link

https://codepen.io/manico/pen/KoqRYq

Steps to reproduce

Create render function with first argument as function that returns html tag.

What is expected?

Element should render.
https://codepen.io/manico/pen/JLJvQw

What is actually happening?

Element is not rendered.
https://codepen.io/manico/pen/KoqRYq


According to documentation (https://vuejs.org/v2/guide/render-function.html#createElement-Arguments), first argument of createElement function can be function that returns html tag name or component options. When we have function that returns html tag name this does not work.

As far as I can see (not sure if I'm looking in the right place https://github.com/vuejs/vue/blob/dev/src/core/vdom/create-element.js#L96) there is no handling of function for tag. So maybe documentation is out of date?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions