WorkerLocation: protocol-Eigenschaft
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since Juli 2015.
Hinweis: Diese Funktion ist nur in Web Workers verfügbar.
Die protocol-Eigenschaft eines WorkerLocation-Objekts gibt den protocol-Teil des Standorts des Workers zurück.
Wert
Ein String.
Beispiele
js
// In a Web worker, on the page https://big.rakal.top/en-US/docs/Web
const result = location.protocol; // Returns 'https:'
Spezifikationen
| Specification |
|---|
| HTML> # dom-workerlocation-protocol> |
Browser-Kompatibilität
Loading…
Siehe auch
- Das
WorkerLocation-Interface, zu dem es gehört.