TypeError when using html template element
See original GitHub issueHello,
I use Webpack 2 to import Tippy, just with an alias:
resolve: {
alias: {
'tippy$': 'tippy.js/dist/tippy.js',
}
}
Then when creating a new Tippy instance:
import Tippy from 'tippy.js'
//...
new Tippy('.test', {
html : document.querySelector('#test') //It works fine with just the selector '#test'
})
I got the following error:
TypeError: Converting circular structure to JSON
at Object.stringify (<anonymous>)
at Tippy._applyIndividualSettings (webpack:///./~/tippy.js/dist/tippy.js?:2653:47)
It seems the HTMLElement is passed through the JSON.stringify method.
I have doubts on my way to import Tippy with webpack, but I’m running out of things to try…
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Angular Application from html-template getting TypeError ...
It must be that your code in main.js is getting executed before the .mobile-nav-toggle is ready. At that point the element is not...
Read more >The parser breaks when using html template tag #4800
The parser breaks when using html template tag: > stylelint "client/src/pages/**/*.ts" TypeError: result.apply is not a function at ...
Read more >The Content Template element - HTML - MDN Web Docs
The <template> HTML element is a mechanism for holding HTML that is not to be rendered immediately when a page is loaded but...
Read more >Templating in HTML
The entire process of cloning a template and updating it with data is ... The organization of the lit-html and lit-element packages didn't ......
Read more >5. Working with the Shadow DOM - Modern JavaScript [Book]
The first step is to create a template node. This example leverages the template from the previous chapter, with the addition of an...
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 Free
Top 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

Well it works for me now 😃 Thank you.
Any luck?