diff options
author | Connor Brewster <connor.brewster@eagles.oc.edu> | 2017-07-19 13:10:54 -0600 |
---|---|---|
committer | Connor Brewster <connor.brewster@eagles.oc.edu> | 2017-08-09 11:06:44 -0600 |
commit | e83a0045f9016b7d03631389107c1748a27fdb0c (patch) | |
tree | 5fd243b5602be68056c04bc1d0260aa40e03ef45 /components/script/dom/element.rs | |
parent | ec528e944a922ec4786b935be5a25e365174d1a1 (diff) | |
download | servo-e83a0045f9016b7d03631389107c1748a27fdb0c.tar.gz servo-e83a0045f9016b7d03631389107c1748a27fdb0c.zip |
Add upgrade reaction
Diffstat (limited to 'components/script/dom/element.rs')
-rw-r--r-- | components/script/dom/element.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index 328dd76e822..b44757d3aa1 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -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() { |