StorageAccessHandle: SharedWorker() Methode
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Hinweis:
Siehe SharedWorker()
, um die Verwendung zu verstehen.
Syntax
SharedWorker(aURL)
SharedWorker(aURL, name)
SharedWorker(aURL, options)
Parameter
aURL
-
Siehe
SharedWorker()
. name
Optional-
Siehe
SharedWorker()
. options
Optional-
Siehe
SharedWorker()
.
Hinweis: options.sameSiteCookies
unterstützt nur den Wert "none", welcher der Standardwert ist.
Rückgabewert
Ein unpartitioniertes SharedWorker
Objekt.
Ausnahmen
SecurityError
DomException
-
Wird ausgelöst, wenn der Zugriff nicht gewährt wurde.
Siehe SharedWorker()
Beispiele
document.requestStorageAccess({ SharedWorker: true }).then(
(handle) => {
console.log("SharedWorker access granted");
handle.SharedWorker(shared_worker_url);
},
() => {
console.log("SharedWorker access denied");
},
);
Hinweis: Siehe Verwenden der Storage Access API für ein vollständigeres Beispiel.
Spezifikationen
Specification |
---|
Extending Storage Access API (SAA) to non-cookie storage # ref-for-dom-storageaccesshandle-sharedworker |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
SharedWorker |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support