Uncaught DOMException: Failed to execute 'setAttribute' on 'Element': '0' is not a valid attribute name.
See original GitHub issueI’m submitting a … (check one with “x”)
[x] Bug report => search github for a similar issue or PR before submitting
[ ] Feature request
[ ] Other, please describe
Tell about your platform
- Vue.js version : 3.2.22
- Browser name and version : Chrome 96
- This package version : 2.0.1
Current behavior
Whenever I call this.$toast.open('.');
I get:
runtime-core.esm-bundler.js?5c40:6769 Uncaught DOMException: Failed to execute 'setAttribute' on 'Element': '0' is not a valid attribute name.
at patchAttr (webpack-internal:///./node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js:473:16)
at patchProp (webpack-internal:///./node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js:672:9)
at mountElement (webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:3946:25)
at processElement (webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:3918:13)
at patch (webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:3838:21)
at ReactiveEffect.componentUpdateFn [as fn] (webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:4377:21)
at ReactiveEffect.run (webpack-internal:///./node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js:195:29)
at setupRenderEffect (webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:4496:9)
at mountComponent (webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:4279:9)
at processComponent (webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:4237:17)
logError @ runtime-core.esm-bundler.js?5c40:6769
handleError @ runtime-core.esm-bundler.js?5c40:6755
callWithErrorHandling @ runtime-core.esm-bundler.js?5c40:6709
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js?5c40:6715
invoker @ runtime-dom.esm-bundler.js?830f:350
Minimal reproduction of the problem with instructions
I just followed the instructions. I have the line above to show the toast and createApp(App).use(router).use(VueToast).mount('#app');
in main.ts
using class components and hammer but no other libs
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
']' is not a valid attribute name. angular 4 - Stack Overflow
Failed to execute 'setAttribute' on 'Element': ']' is not a valid attribute name. I simply made model: export interface ModalComponentModel { ...
Read more >Failed to execute 'setAttribute' on 'Element': '0' is not a valid ...
Hey, I'm creating a new module for Nuxt and when I'm adding a plugin pushing a script to the DOM, the following error...
Read more >Failed to execute 'setAttribute' on 'Element'" error occurs when ...
The "Uncaught DOMException: Failed to execute 'setAttribute' on 'Element': '[expanded]' is not a valid attribute name." error occurs:.
Read more >Failed to execute 'setAttribute' on 'Element': '(click)' is not a ...
I'm trying to execute a function after clicking, ... Failed to execute 'setAttribute' on 'Element': '(click)' is not a valid attribute name.
Read more >Failed to execute 'setAttribute' on 'Element': 'online..."' is not a ...
Uncaught DOMException : Failed to execute 'setAttribute' on 'Element': 'online..."' is not a valid attribute name.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@yspreen
Use it this way:
This doesn’t work for me:
this.$toast.open('You did it!');
with the same exception
This works