mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Formatted code
This commit is contained in:
parent
816e599db3
commit
a00b5b2053
3 changed files with 25 additions and 18 deletions
|
@ -1872,7 +1872,7 @@ impl ScriptThread {
|
|||
reply,
|
||||
)
|
||||
},
|
||||
WebDriverScriptCommand::FindElementElementsCSS(selector,element_id,reply) => {
|
||||
WebDriverScriptCommand::FindElementElementsCSS(selector, element_id, reply) => {
|
||||
webdriver_handlers::handle_find_element_elements_css(
|
||||
&*documents,
|
||||
pipeline_id,
|
||||
|
|
|
@ -226,11 +226,12 @@ pub fn handle_find_element_elements_css(
|
|||
element_id: String,
|
||||
selector: String,
|
||||
reply: IpcSender<Result<Option<String>, ()>>,
|
||||
){
|
||||
let node_ids = find_node_by_unique_id(documents,pipeline,element_id)
|
||||
) {
|
||||
let node_ids = find_node_by_unique_id(documents, pipeline, element_id)
|
||||
.ok_or(())
|
||||
.and_then(|node|{
|
||||
node.query_selector_all(DOMString::from(selector)).map_err(|_| ())
|
||||
.and_then(|node| {
|
||||
node.query_selector_all(DOMString::from(selector))
|
||||
.map_err(|_| ())
|
||||
})
|
||||
.map(|nodes| {
|
||||
nodes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue