Implement CEReactions codegen

This commit is contained in:
Connor Brewster 2017-07-10 10:45:26 -06:00
parent e57ed3d42f
commit 438191e0b2
4 changed files with 73 additions and 15 deletions

View file

@ -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() {