mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Give attribute-change callbacks a realm so they can to_jsval
This commit is contained in:
parent
419954474b
commit
ea4c709e96
2 changed files with 7 additions and 1 deletions
|
@ -897,6 +897,10 @@ impl CustomElementReactionStack {
|
|||
}
|
||||
|
||||
let cx = element.global().get_cx();
|
||||
// We might be here during HTML parsing, rather than
|
||||
// during Javscript execution, and so we typically aren't
|
||||
// already in a realm here.
|
||||
let _ac = JSAutoRealm::new(*cx, element.global().reflector().get_jsobject().get());
|
||||
|
||||
let local_name = DOMString::from(&*local_name);
|
||||
rooted!(in(*cx) let mut name_value = UndefinedValue());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue