mirror of
https://github.com/servo/servo.git
synced 2025-07-22 06:43:40 +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,
|
||||
};
|
||||
|
||||
let elem = node
|
||||
.downcast::<HTMLElement>()
|
||||
.expect("This should be an HTMLElement");
|
||||
let Some(elem) = node.downcast::<HTMLElement>() else {
|
||||
// the style attribute only works on html elements
|
||||
reply.send(None).unwrap();
|
||||
return;
|
||||
};
|
||||
let style = elem.Style();
|
||||
|
||||
let msg = (0..style.Length())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue