mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
Don't attempt to report style attribute for non-htmlelements to devtools (#35519)
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
f01d525852
commit
32f19c1eae
1 changed files with 5 additions and 3 deletions
|
@ -198,9 +198,11 @@ pub(crate) fn handle_get_attribute_style(
|
||||||
Some(found_node) => found_node,
|
Some(found_node) => found_node,
|
||||||
};
|
};
|
||||||
|
|
||||||
let elem = node
|
let Some(elem) = node.downcast::<HTMLElement>() else {
|
||||||
.downcast::<HTMLElement>()
|
// the style attribute only works on html elements
|
||||||
.expect("This should be an HTMLElement");
|
reply.send(None).unwrap();
|
||||||
|
return;
|
||||||
|
};
|
||||||
let style = elem.Style();
|
let style = elem.Style();
|
||||||
|
|
||||||
let msg = (0..style.Length())
|
let msg = (0..style.Length())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue