Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in IE11 when we extend HTMLElement #4659

Closed
4leem opened this issue Oct 4, 2016 · 1 comment
Closed

Error in IE11 when we extend HTMLElement #4659

4leem opened this issue Oct 4, 2016 · 1 comment
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@4leem
Copy link

4leem commented Oct 4, 2016

We are using babel-core (v6.14.0), babel-loader(v6.2.4) for webpack, babel-polyfill(v6.5.0) for our React based project.

I get error in IE 11 -

Exception thrown and not caught

Sample code:

class SuperBtn extends HTMLElement {
    constructor() {
        super();
    }
    createdCallback() {
        this.innerHTML = "Invoke Ultron!";
        this.addEventListener('click', () => alert(this.textContent + ' has been clicked'));
    }
}

The HTMLElement is returned as object while the _inherits() method expects a function.

The Babel Documentation states,

Built-in subclassability should be evaluated on a case-by-case basis as classes such as HTMLElement can be subclassed while many such as Date, Array and Error cannot be due to ES5 engine limitations.

..but it doesn't seem to work for us, is there something missing or work around?

@hzoo
Copy link
Member

hzoo commented Oct 4, 2016

Sounds like #4480

Going to close in favor of ^, can reopen if not

@hzoo hzoo closed this as completed Dec 14, 2016
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label May 5, 2018
@lock lock bot locked as resolved and limited conversation to collaborators May 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests

2 participants