Coder Social home page Coder Social logo

IE11 "The custom element being constructed was not registered with 'customElements'" about babel-plugin-transform-builtin-classes HOT 10 CLOSED

wiledal avatar wiledal commented on May 28, 2024
IE11 "The custom element being constructed was not registered with 'customElements'"

from babel-plugin-transform-builtin-classes.

Comments (10)

WebReflection avatar WebReflection commented on May 28, 2024

do you see same error in this page?
https://webreflection.github.io/hyperHTML-Element/test/

The used configuration is this one:
https://github.com/WebReflection/hyperHTML-Element/blob/master/.babelrc

from babel-plugin-transform-builtin-classes.

wiledal avatar wiledal commented on May 28, 2024

Hey,

IE11 throws syntax errors on that page due to arrow-functions.

screenshot 2017-08-02 08 37 35

screenshot 2017-08-02 08 38 58

from babel-plugin-transform-builtin-classes.

WebReflection avatar WebReflection commented on May 28, 2024

That's because I'm stupid and wrote wrong link.

Can you try again, please?
https://webreflection.github.io/hyperHTML-Element/test/?es5

from babel-plugin-transform-builtin-classes.

wiledal avatar wiledal commented on May 28, 2024

Different issue!
But looks like the <my-input> is at least initiating.

screenshot 2017-08-02 09 23 37

screenshot 2017-08-02 09 24 06

from babel-plugin-transform-builtin-classes.

WebReflection avatar WebReflection commented on May 28, 2024

will have a look, I'm sure at some point everything was working in IE11 too.
Apologies for any inconvenience

from babel-plugin-transform-builtin-classes.

WebReflection avatar WebReflection commented on May 28, 2024

It was rather an HyperHTMLElement class issue, it was doing weird prototypal runtime changes unsupported by non Reflect.construct aware engines.

Fixed in HyperHTMLELement v0.2.2

from babel-plugin-transform-builtin-classes.

WebReflection avatar WebReflection commented on May 28, 2024

Uh ... wait, I think I've fixed my issues, but you were not using HyperHTMLElement class at all ... do you mind trying using it?

https://github.com/WebReflection/hyperHTML-Element/blob/master/index.js

I am trying to figure out if it's a gotcha of the transpiled code hence something easy to document as caveat, thanks for your patience and help.

from babel-plugin-transform-builtin-classes.

WebReflection avatar WebReflection commented on May 28, 2024

So ... it's been a fun journey.

Thanks to this issue, I've discovered a bug related to IE11 in my Custom Elements polyfill

However, once I've patched my polyfill, you can see everything works as expected:
https://webreflection.github.io/babel-plugin-transform-builtin-classes/test/

It's your code with my polyfill instead (which is used by AMPHTML Google project too, in case you are guessing if it's "a cool one")

TL;DR you should use a better polyfill for Custom Elements 😉

Thanks for the report though!

from babel-plugin-transform-builtin-classes.

wiledal avatar wiledal commented on May 28, 2024

Ah!

Yes, it does indeed work using your polyfill instead of the 'webcomponents' one (https://github.com/webcomponents/custom-elements). Interesting.

Seems like I'll be using document-register-element in the future!
A bit unfortunate with the v0 naming tho, hehe 🙃

Thanks!

from babel-plugin-transform-builtin-classes.

WebReflection avatar WebReflection commented on May 28, 2024

A bit unfortunate with the v0 naming tho

I've created the V0 polyfill first, and when V1 came up all V0 users asked me when V1 would've been implemented in the V0 polyfill 😄

It ended up implementing V1 on top of V0 so that Chrome with V0 but no V1 would've benefit from it, and every other browser would've benefit from the battle-tested/stable V0 polyfill and its target devices

Although, I agree that name for a repository and a polyfill in general (dre anyone?) was very naive of me 🤷‍♂️

from babel-plugin-transform-builtin-classes.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.