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

add support for addEventListener as a no-op #81

Closed
thescientist13 opened this issue Aug 3, 2022 · 0 comments · Fixed by #82
Closed

add support for addEventListener as a no-op #81

thescientist13 opened this issue Aug 3, 2022 · 0 comments · Fixed by #82
Assignees
Labels
feature New feature or request v0.6.0
Milestone

Comments

@thescientist13
Copy link
Member

thescientist13 commented Aug 3, 2022

Type of Change

  • New Feature Request

Summary

At the very least, we should be able to provide a no-op for addEventListener.

Details

So a case like this should not error at least

class MyComponent extends HTMLElement {
  constructor() {
    super();

    this.addEventListener('someCustomEvent', () => { console.log('it worked!'); });
  }

  connectedCallback() {
    this.innerHTML = '<h1>It worked!</h1>';
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request v0.6.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant