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

Can not call super? #6

Closed
Closed

Description

@retrocausal

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

Activity

  1. justinfagnani commented on Sep 9, 2016

    @justinfagnani
    Contributor

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

  2. retrocausal commented on Sep 9, 2016

    @retrocausal
    Author

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

  3. justinfagnani commented on Sep 9, 2016

    @justinfagnani
    Contributor

    Only HTMLElement

  4. TypedSource commented on Jan 24, 2018

    @TypedSource

    are you still working on it?

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

  5. justinfagnani commented on Jan 24, 2018

    @justinfagnani
    Contributor

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

  6. peacememories commented on May 25, 2018

    @peacememories

    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 join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions