Uncaught TypeError: Illegal constructor Error
See original GitHub issueHi,
I am getting this error:
Uncaught TypeError: Illegal constructor
at n (prism.js:1)
at prism.js:1
at prism.js:1
at Array.forEach (<anonymous>)
at Prism.plugins.toolbar.hook (prism.js:1)
at Object.run (prism.js:1)
at Object.highlightElement (prism.js:1)
at HTMLDocument.highlightAll (prism.js:1)
It seems to be showing when I add the “Copy to Clipboard Button” package.
My browser I am getting the error is Google Chrome Version 62.0.3200.0 (Official Build)
Here is a screenshot of the error in dev tools:
For now I am just going to live with out adding this plugin. I thought I’d let you know anyway.
p.s. Normal setup works fine no problem. It only appears with this plugin addon.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:18 (8 by maintainers)
Top Results From Across the Web
How to solve "Uncaught TypeError: Illegal constructor"
The Illegal constructor error is thrown when a class extends HTMLElement, but is instantiated like a regular class. Using classes that inherits from ......
Read more >Illegal constructor with EcmaScript 6 - javascript - Stack Overflow
It looks like you're trying to extend DOM's Node . You can't do that, it's defined as an abstract interface, and the host-provided...
Read more >Uncaught TypeError: Illegal constructor in Chrome when a ...
I'm running into a frustrating problem with some custom elements I'm defining and am hoping for some bread crumbs from someone with a...
Read more >1186698 - PeerConnection.js: TypeError: Illegal constructor
The answer is that an error is reported to the web console (and to the page's onerror handler), just without useful location information....
Read more >Getting an error with effect.js in Chrome "Illegal Constructor"
Getting an error with effect.js in Chrome "Illegal Constructor" ... This is triggering an error in Chrome 39 ... Uncaught TypeError: Illegal constructor....
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
This version of the fix is here: #1206.
@caraya Thanks, that might be it, but Chrome 61 (or 63) doesn’t have a
navigator.clipboard
property. I’m still not sure the cause.Update: Yes, the
window.Clipboard
prototype matches the Clipboard inteface in the spec, so this must be an early introduction as they build out the infra for this Clipboard api.Just so everyone knows, this can be resolved by including Clipboard.js yourself, either in a script tag or bundled into your JS. It’s specifically the plugin’s behavior to fallback to a CDN version if it doesn’t find Clipboard.js that is failing.