mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Implement CEReactions codegen
This commit is contained in:
parent
e57ed3d42f
commit
438191e0b2
4 changed files with 73 additions and 15 deletions
|
@ -746,6 +746,24 @@ impl ScriptThread {
|
|||
let _ = window.layout_chan().send(msg);
|
||||
}
|
||||
|
||||
pub fn push_new_element_queue() {
|
||||
SCRIPT_THREAD_ROOT.with(|root| {
|
||||
if let Some(script_thread) = root.get() {
|
||||
let script_thread = unsafe { &*script_thread };
|
||||
script_thread.custom_element_reaction_stack.push_new_element_queue();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
pub fn pop_current_element_queue() {
|
||||
SCRIPT_THREAD_ROOT.with(|root| {
|
||||
if let Some(script_thread) = root.get() {
|
||||
let script_thread = unsafe { &*script_thread };
|
||||
script_thread.custom_element_reaction_stack.pop_current_element_queue();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
pub fn enqueue_callback_reaction(element:&Element, reaction: CallbackReaction) {
|
||||
SCRIPT_THREAD_ROOT.with(|root| {
|
||||
if let Some(script_thread) = root.get() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue