-
Notifications
You must be signed in to change notification settings - Fork 47.3k
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
Changes to attribute whitelist logic #10564
Merged
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
e10694a
Remove HTMLPropertyConfig entries for non-boolean values
nhunzaker 711bafe
Only HAS_BOOLEAN_VALUE attribute flag can assign booleans
nhunzaker 4c5dfbb
Use a non-boolean attribute in object assignment tests
nhunzaker e086ff1
Add HAS_STRING_BOOLEAN_VALUE attribute flag
nhunzaker 0410651
Fix boolean tests, add boolean warning.
nhunzaker ab75d9a
Reserved props should allow booleans
nhunzaker 6077e0b
Remove outdated comments
gaearon 6f913ed
Style tweaks
gaearon aca8d9c
Don't treat dashed SVG tags as custom elements
gaearon af7d035
SVG elements like font-face are not custom attributes
nhunzaker 9c0751f
Move namespace check to isCustomAttribute. Add caveat for stack.
nhunzaker f8da44e
Remove unused namespace variable assignment
nhunzaker b93e093
Fix the DEV-only whitelist
gaearon fbcced1
Don't read property twice
gaearon a270e03
Ignore and warn about non-string `is` attribute
gaearon ed92af0
Blacklist "aria" and "data" attributes
gaearon 5a339a1
Don't pass unknown on* attributes through
gaearon 0b2ba65
Remove dead code
gaearon 3f85316
Avoid accessing namespace when possible
nhunzaker 76a6318
Drop .only in ReactDOMComponent-test
nhunzaker b29bb74
Make isCustomComponent logic more solid
gaearon 0a2aec4
Do attribute name check earlier
gaearon 501e86d
Fix fbjs import
gaearon 8d1f487
Revert unintentional edit
gaearon 72666fa
Re-allow "data" attribute
gaearon cb687ed
Use stricter check when attaching events
gaearon 1d61379
Pass SVG boolean attributes with correct casing
gaearon 2b0f61a
Fix the test
gaearon 1590c2a
Undo the SVG dashed-name fix
gaearon cb883a6
Prettier
gaearon 32f6321
Fix lint
gaearon 6d9c0e0
Fix flow
gaearon 10e0c09
Pass "aria" through but still warn
gaearon ba71ec1
Remove special cases for onfocusin, onfocusout
gaearon dc760af
Add a more specific warning for unknown events
gaearon 10950c4
Pass badly cased React attributes through with warning
gaearon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Move namespace check to isCustomAttribute. Add caveat for stack.
- Loading branch information
commit 9c0751fc356e7e797815e5dd18df01ee85764436
There are no files selected for viewing
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
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
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
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
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
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
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
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.
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.
@gaearon I moved the namespace check into this module. Stack validates properties before the namespace is assigned to the element, so we don't know if the element is SVG or HTML during initial validations.
namespace == null
can go away when stack is removed. This also preserves the custom element behavior for 15.x, if that matters.