Realm.extension() 方法
🌐 Realm.extension() method
返回创建此域的 Extension,如果适用的话。通常当域是由注入到页面的扩展内容脚本创建时,此字段会被填充。
🌐 Returns the Extension that created this realm, if applicable. This is typically populated when the realm was created by an extension content script injected into a page.
语法
🌐 Signature
class Realm {
abstract extension(): Promise<Extension | null>;
}
返回:
Promise<Extension | null>
一个承诺,将解析为 Extension 或 null,如果不是由扩展创建的。
🌐 A promise that resolves to the Extension or null if not created by an extension.