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

Remove first parameter of Element constructor #260

Closed
willeastcott opened this issue Jan 9, 2023 · 0 comments · Fixed by #273
Closed

Remove first parameter of Element constructor #260

willeastcott opened this issue Jan 9, 2023 · 0 comments · Fixed by #273

Comments

@willeastcott
Copy link
Contributor

Currently, the Element constructor takes 2 arguments:

  • A DOM element (or string representing a DOM element that can be passed to document.createElement).
  • An options object. The options object allows for a dom property to be set which duplicates what can be specified by the first argument.

The Element constructor signature differs from all of its subclasses in having this first element. I propose we:

  • Drop this first argument and instead rely solely on the dom property of the options object (which defaults to div if not specified).
  • Bump major version number to 4.0.0 since this is a breaking API change.
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

Successfully merging a pull request may close this issue.

1 participant