mirror of
https://github.com/servo/servo.git
synced 2025-07-24 07:40:27 +01:00
Add upgrade reaction
This commit is contained in:
parent
ec528e944a
commit
e83a0045f9
3 changed files with 28 additions and 3 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue