Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Warning when using <search> native HTML element #13021

Discussion options

Hi, I'm trying to replace an HTML section with search in my Vue component now that it's fully supported and am getting a Vue warning in the console.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/search

SearchContainer.vue:158 [Vue warn]: Failed to resolve component: search If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.

Am I to understand that Vue 3 doesn't recognize that search is a native HTML element?
Do I need to update something in order for search to be recognized by Vue?

Thanks!

You must be logged in to vote

<search> is a relatively recent addition, so it wasn't included when Vue 3 was first released.

There's an explanation at #9249 (comment) about why it isn't trivial to add it now.

The workaround in the meantime is to use isCustomElement, see #9247 (comment).

Replies: 1 comment

Comment options

<search> is a relatively recent addition, so it wasn't included when Vue 3 was first released.

There's an explanation at #9249 (comment) about why it isn't trivial to add it now.

The workaround in the meantime is to use isCustomElement, see #9247 (comment).

You must be logged in to vote
0 replies
Answer selected by idv8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /