mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
parent
933b74781b
commit
51df04d93e
7 changed files with 152 additions and 5 deletions
|
@ -10,7 +10,7 @@ use dom::bindings::error::{ErrorInfo, report_pending_exception};
|
|||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::{MutNullableJS, Root};
|
||||
use dom::bindings::reflector::DomObject;
|
||||
use dom::bindings::settings_stack::{AutoEntryScript, entry_global};
|
||||
use dom::bindings::settings_stack::{AutoEntryScript, entry_global, incumbent_global};
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::crypto::Crypto;
|
||||
use dom::dedicatedworkerglobalscope::DedicatedWorkerGlobalScope;
|
||||
|
@ -528,6 +528,13 @@ impl GlobalScope {
|
|||
pub fn entry() -> Root<Self> {
|
||||
entry_global()
|
||||
}
|
||||
|
||||
/// Returns the ["incumbent"] global object.
|
||||
///
|
||||
/// ["incumbent"]: https://html.spec.whatwg.org/multipage/#incumbent
|
||||
pub fn incumbent() -> Option<Root<Self>> {
|
||||
incumbent_global()
|
||||
}
|
||||
}
|
||||
|
||||
fn timestamp_in_ms(time: Timespec) -> u64 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue