-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Remove and prevent DOM access in attributes parsing #608
Copy link
Copy link
Closed
Labels
[Feature] Block APIAPI that allows to express the block paradigm.API that allows to express the block paradigm.[Feature] BlocksOverall functionality of blocksOverall functionality of blocks
Description
In an effort to avoid tying block parsing to the DOM, we should not expect block implementers to provide custom matchers for attribute parsing.
Examples:
- https://github.com/WordPress/gutenberg/blob/29462aa/blocks/library/image/index.js#L35
- https://github.com/WordPress/gutenberg/blob/29462aa/blocks/library/quote/index.js#L18-L30
Instead, we should decide between:
- Expecting these attributes to be serialized in the block comment
- Providing additional matchers to satisfy the need required by these blocks
To discourage taking advantage of matchers currently receiving the DOM node, we could consider adding an internal flag, and picking only keys from the block attributes property whose values are an allowable matcher.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Feature] Block APIAPI that allows to express the block paradigm.API that allows to express the block paradigm.[Feature] BlocksOverall functionality of blocksOverall functionality of blocks
Type
Fields
Give feedbackNo fields configured for issues without a type.