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

Allow InputStyleCloneElement to be constructed directly #6

Merged
merged 3 commits into from
Sep 24, 2024

Conversation

iansan5653
Copy link
Owner

@iansan5653 iansan5653 commented Sep 24, 2024

Allows constructing InputStyleCloneElement directly with new InputStyleCloneElement() (no constructor parameters). This functionality is expected by DOM APIs like cloneNode.

Attempting to then insert the constructed element will result in it removing itself from the DOM tree since an InputStyleCloneElement cannot function without a target input element to clone. Instead, the clone must be bound with connect(target). Or, preferably, the clone can still be reused from the registry with InputStyleCloneElement.for(target).

@iansan5653 iansan5653 marked this pull request as ready for review September 24, 2024 20:00
@iansan5653 iansan5653 merged commit 8a27e02 into main Sep 24, 2024
1 check passed
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 this pull request may close these issues.

InputStyleCloneElement throws a TypeError when cloned
1 participant