mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
devtools: Support getting XPath selector for node actor (#39892)
You can copy the XPath selector from the inspector by right-clicking on a node and selecting `Copy->XPath`. Testing: I tried adding a test but the effort didn't seem worth it. The devtools tests are currently very specifically tailored towards source-list tests. Part of https://github.com/servo/servo/issues/39862 Part of #34527 Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
@@ -2107,6 +2107,9 @@ impl ScriptThread {
|
||||
DevtoolScriptControlMsg::GetLayout(id, node_id, reply) => {
|
||||
devtools::handle_get_layout(&documents, id, node_id, reply, can_gc)
|
||||
},
|
||||
DevtoolScriptControlMsg::GetXPath(id, node_id, reply) => {
|
||||
devtools::handle_get_xpath(&documents, id, node_id, reply)
|
||||
},
|
||||
DevtoolScriptControlMsg::ModifyAttribute(id, node_id, modifications) => {
|
||||
devtools::handle_modify_attribute(&documents, id, node_id, modifications, can_gc)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user