Skip to content

Unknown custom element: <foreignObject> #11575

Closed
@ThomasR

Description

@ThomasR

Version

2.6.11

Reproduction link

https://jsfiddle.net/0jh1psog/

Steps to reproduce

Open the console in the provided JSFiddle
or
run Vue.config.getTagNamespace('foreignObject')

What is expected?

Vue.config.getTagNamespace('foreignObject') should return 'svg'

What is actually happening?

It returns undefined.

This causes a warning Unknown custom element: <foreignObject> when testing such components using vue-test-utils


This is caused by

'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +

It should be foreignobject with lowercase o here, because of the makeMap implementation.

To avoid such bugs in the future, even better fix:

map[list[i]] = true

should be map[expectsLowerCase ? list[i].toLowerCase() : list[i]] = true

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions