-
Notifications
You must be signed in to change notification settings - Fork 3.1k
HTML API: Add method to create fragment at node #7348
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
Closed
sirreal
wants to merge
33
commits into
WordPress:trunk
from
sirreal:html-api/add-spawn-fragment-parser-method
Closed
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
d8ac361
Add spawn_fragment_parser method
sirreal ad8f8db
Fix the processor context_node
sirreal e2efee4
Make it public
sirreal 4f5249c
Fix spawn_fragment_parser method
sirreal eaed863
Process non-body context tests
sirreal 25b18fa
Handle all the different document context in html5lib tests
sirreal 9ac142f
lints
sirreal 9ede14f
Merge branch 'trunk' into html-api/add-spawn-fragment-parser-method
sirreal 3f35886
Make spawned fragment parse have HTML > [context-node-tag] in breadcr…
sirreal ba9e218
Fallback to context node when checking namespace
sirreal fe48fa5
Add tests
sirreal fa4c5cb
Set the form element pointer on the fragment parser
sirreal fbb5c2f
Merge branch 'trunk' into html-api/add-spawn-fragment-parser-method
sirreal 336050d
Merge branch 'trunk' into html-api/add-spawn-fragment-parser-method
sirreal 943bbdd
Revert "Fallback to context node when checking namespace"
sirreal e3a0a86
Fix initial namespace on integration nodes
sirreal 9d3b318
Merge branch 'trunk' into html-api/add-spawn-fragment-parser-method
sirreal 27a9781
Rename method, use static constructor, add comments
sirreal 0789538
Update method name in tests
sirreal 5e8b82e
Add ticket to tests
sirreal 7eeec27
Merge branch 'trunk' into html-api/add-spawn-fragment-parser-method
sirreal 37f9ff4
Update method name in html5lib tests
sirreal 80ae6f2
Handle null return from create_fragment
sirreal 9866402
Use a cloned copy of the FORM element from the parent processor
sirreal bcebeba
Remove stale comment
sirreal 9e11f19
Improve method documentation with examples
sirreal 05801bb
Merge branch 'trunk' into html-api/add-spawn-fragment-parser-method
sirreal 4618b90
Merge branch 'trunk' into html-api/add-spawn-fragment-parser-method
sirreal a02e238
Improve docblock language and formatting
sirreal 9440890
Improve comment, add PLAINTEXT
sirreal 25ae695
Pull in relevant fixes/improvements from #7777
sirreal f2b4121
Merge branch 'trunk' into html-api/add-spawn-fragment-parser-method
sirreal 0662156
Fix context node attributes
sirreal 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
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
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.
The docs say that
get_attribute_names_with_prefixreturnsnullThis got me thinking -- should we disallow
create_fragment_at_current_nodefrom being called when the processor is paused on a tag closer?(If we do, then we should be able to remove this guard, as it would be guaranteed that we're at a tag opener.)
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.
Good thought! This won't behave as expected on closers, and it seems like a strange thing to do in general.
#7859