Skip to content
This repository has been archived by the owner on Oct 26, 2021. It is now read-only.

Can not call super? #6

Closed
retrocausal opened this issue Sep 9, 2016 · 6 comments
Closed

Can not call super? #6

retrocausal opened this issue Sep 9, 2016 · 6 comments

Comments

@retrocausal
Copy link

I defined a class for a custom div element like so:

class myAwesomeDiv extends HTMLDivElement{

  constructor(){
    super();
    this.addEventListener('click',e=>this.toggleFav());
  }
 toggleFav(){}
}

and on using it as <awesome-div></awesome-div> ,

I am seeing this (line 82 in app.js is the call to super())
screenshot from 2016-09-09 21-05-29

@justinfagnani
Copy link
Contributor

You can't extend HTMLDivElement right now. We'll be adding customized built-in elements support soon.

@retrocausal
Copy link
Author

thanks @justinfagnani . Is there a list of elements currently supported?

@justinfagnani
Copy link
Contributor

Only HTMLElement

@TypedSource
Copy link

are you still working on it?

i need self defined input and textarea elements in forms ;)

@justinfagnani
Copy link
Contributor

We're still in a situation where we have no native implementations of customized built in elements. That may change soon...

@peacememories
Copy link

It seems like Chrome supports it as far as I can tell. I would love to have access to this feature via a polyfill so I can extend the functionality of a textarea.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants