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

Don't export a base class #10

Open
stevenvachon opened this issue Apr 29, 2019 · 0 comments
Open

Don't export a base class #10

stevenvachon opened this issue Apr 29, 2019 · 0 comments

Comments

@stevenvachon
Copy link

The problem with this project's exported WebComponent is that it extends HTMLElement when a use case may need to extend something else, such as HTMLInputElement.

Instead, this project should export simple functions:

import {getNumberAttribute} from 'webcomponent';

class MyComponent extends HTMLInputElement {
    something() {
        const value = getNumberAttribute(this, "attr-name");
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant