diff options
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r-- | components/script/script_thread.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index ccc5d97b282..6f811c8be67 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -753,6 +753,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() { |