mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
script: Make callbacks generic over DOM interfaces. (#35459)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
2b0d2ecc73
commit
a433b20259
9 changed files with 141 additions and 97 deletions
|
@ -3348,6 +3348,10 @@ pub(crate) trait GlobalScopeHelpers<D: crate::DomTypes> {
|
|||
) -> DomRoot<D::GlobalScope>;
|
||||
|
||||
fn origin(&self) -> &MutableOrigin;
|
||||
|
||||
fn incumbent() -> Option<DomRoot<D::GlobalScope>>;
|
||||
|
||||
fn perform_a_microtask_checkpoint(&self, can_gc: CanGc);
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
|
@ -3375,4 +3379,12 @@ impl GlobalScopeHelpers<crate::DomTypeHolder> for GlobalScope {
|
|||
fn origin(&self) -> &MutableOrigin {
|
||||
GlobalScope::origin(self)
|
||||
}
|
||||
|
||||
fn incumbent() -> Option<DomRoot<Self>> {
|
||||
GlobalScope::incumbent()
|
||||
}
|
||||
|
||||
fn perform_a_microtask_checkpoint(&self, can_gc: CanGc) {
|
||||
GlobalScope::perform_a_microtask_checkpoint(self, can_gc)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue