-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use XPath to select elements (#1056)
This renames the `inspectDOMElement` API to `inspectDOMNode`, and changes the argument from a CSS selector to an XPath selector. The problem with CSS selectors are that they only support selecting elements, whereas XPath allows us to select any arbitrary DOM node, including text nodes, comments etc. This commit sets a better foundation for supporting things other than classic components. Since Glimmer components, route templates, "tagless" classic components etc have "outer HTML" semantics, they don't necessarily have a single element. Going forward, we will likely want to select the first node in a component's "bounds", which could be an arbitrary DOM node (i.e. may or may not be an element node, so CSS selectors are not sufficient).
- Loading branch information
1 parent
0058477
commit 3357dff
Showing
5 changed files
with
18 additions
and
16 deletions.
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