-
Notifications
You must be signed in to change notification settings - Fork 405
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
chore: remove attribute mutation restrictions #1362
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ekashida
commented
Jun 19, 2019
// Check that the attribute name of the global property is the same as the | ||
// attribute name being set by setAttribute. | ||
if (attrName === globalAttrName) { | ||
const { error } = globalHTMLProperties[propName]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These errors are meant for when global HTML properties are accessed (e.g., this.dataset
).
caridy
approved these changes
Jun 19, 2019
Benchmark resultsBase commit: lwc-engine-benchmark
|
ravijayaramappa
added a commit
that referenced
this pull request
Mar 4, 2020
restriction was removed via #1362
ravijayaramappa
added a commit
that referenced
this pull request
Mar 6, 2020
restriction was removed via #1362
ravijayaramappa
added a commit
that referenced
this pull request
Mar 11, 2020
* test: remove unit tests related to global attribute restriction restriction was removed via #1362 * test: update error message in scoped-ids.spec.ts * test: update test to match <slot> element spec * test: remove unit test that was testing non-existent functions * test: migrate tests to integration-karma * test: migrate scoped-ids.spec to karma suite * test: migrate html-element.spec.ts to karma * test: migrate traverse.spec.ts to karma suite
ekashida
pushed a commit
that referenced
this pull request
Apr 17, 2020
* test: remove unit tests related to global attribute restriction restriction was removed via #1362 * test: update error message in scoped-ids.spec.ts * test: update test to match <slot> element spec * test: remove unit test that was testing non-existent functions * test: migrate tests to integration-karma * test: migrate scoped-ids.spec to karma suite * test: migrate html-element.spec.ts to karma * test: migrate traverse.spec.ts to karma suite (cherry picked from commit c1b56ec)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Details
It doesn't make sense to restrict attribute mutation methods because authors are responsible for reflecting content attributes when they override default descriptors for global html attributes.
This PR also removes some error logging done in
setAttribute
because those errors are meant for properties.Fixes #1257
Does this PR introduce breaking changes?
No, it does not introduce breaking changes.