Add upgrade reaction

This commit is contained in:
Connor Brewster 2017-07-19 13:10:54 -06:00
parent ec528e944a
commit e83a0045f9
3 changed files with 28 additions and 3 deletions

View file

@ -300,6 +300,10 @@ impl Element {
self.custom_element_reaction_queue.borrow_mut().push(CustomElementReaction::Callback(function, args));
}
pub fn push_upgrade_reaction(&self, definition: Rc<CustomElementDefinition>) {
self.custom_element_reaction_queue.borrow_mut().push(CustomElementReaction::Upgrade(definition));
}
pub fn invoke_reactions(&self) {
let mut reaction_queue = self.custom_element_reaction_queue.borrow_mut();
for reaction in reaction_queue.iter() {