Comments (6)
So, v1.13.0
is out, and I've also added a how to migrate to V1 with hopefully all the details in (already spotted few typos though, on it already)
from document-register-element.
I still need to support IE11
IE doesn't have customElements
so that script tag on top of any of your page would work for IE11 (and many others).
If I remove document-register-element, it works in Firefox too.
That means you shouldn't use DRE in the first place.
I'll try to have a look what is wrong or how I can improve but it seems like you are giving DRE to browsers that shouldn't need it.
Anyway, worth investigating.
from document-register-element.
Are there any plans to remove support for Custom Elements V0 from this polyfill, considering that browsers are already dropping it?
No, but you shouldn't care. V0 is battle tested and used to bring built ins to V1 capable browsers.
Firefox has also been tested extensively, so unless you tell me which version you are using, it's hard for me to do anything here.
The outerHTML
trick you mentioned is used in built-in-element which patches only built-in extends for non capable browsers: https://github.com/WebReflection/built-in-element
If you want to use V1 built-in elements, I strongly suggest you use that polyfill instead.
The way you'd go for it is described in the Medium post, summarized as:
<script>
if (!this.customElements)
document.write('<script src="//unpkg.com/document-register-element"><\x2fscript>');
</script>
You can test the live page there: https://webreflection.github.io/built-in-element/test/es5/
from document-register-element.
Sorry, I should have mentioned the version... it's Firefox 63.0 (64-bit) on Ubuntu 16.04.
I still need to support IE11, so I believe https://github.com/WebReflection/built-in-element would not be enough and I have to use https://github.com/WebReflection/document-register-element.
from document-register-element.
I've just created this jsfiddle to demonstrate the problem: https://jsfiddle.net/0dm72zv6/4/. It works fine in Chrome but fails in Firefox 63. If I remove document-register-element, it works in Firefox too.
from document-register-element.
Ah, that makes sense. Thanks!
Still, I believe that loading document-register-element
should be safe in any browser, even if it is not needed.
from document-register-element.
Related Issues (20)
- LifeCycle events order of nested custom elements inconsistent across Chrome and Firefox HOT 18
- TypeError: new.target does not define a custom element HOT 3
- document.registerElement is deprecated and will be removed in M73 HOT 3
- Post-install script slowness HOT 3
- appreciate your feedback for custom element diagram HOT 8
- [Uncaught DOMException: Failed to execute 'registerElement' on 'Document'] when used in Chrome Extension HOT 16
- Functions are not evaluated in connectedCallback HOT 1
- `this` reference in contructor broken HOT 14
- Multiple instances of the polyfill leads to unexpected behaviour HOT 1
- error ""Failed to construct 'HTMLElement': Please use the 'new' operator"" when using with Angular/elements 8.2.0 HOT 2
- Refreshing a document inside an iframe which loads d-r-e breaks the polyfill and leaves document.createElement as undefined HOT 15
- `attributeChangedCallback()` bound value is invalid HOT 15
- Add DRE to Polyfill.io service HOT 1
- [QUESTION] Unable to get property '_isMounted' of undefiened. HOT 1
- TypeError - Object doesn't support property or method 'registerElement' HOT 3
- Time to compare again? (webcompents/custom-elements) HOT 2
- Polyfill does not seem to be working in IE 11 HOT 6
- postinstall fails in noexec enviornment HOT 1
- We unable to install latest version @1.14.7 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from document-register-element.