Thanks to visit codestin.com
Credit goes to developer.mozilla.org

Dieser Inhalt wurde automatisch aus dem Englischen übersetzt, und kann Fehler enthalten. Erfahre mehr über dieses Experiment.

View in English Always switch to English

WorkerLocation: pathname-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 pathname-Eigenschaft eines WorkerLocation-Objekts gibt den pathname-Teil des Speicherorts des Workers zurück.

Wert

Ein String.

Beispiele

js
// In a Web worker, on the page https://developer.mozilla.org/en-US/docs/Web
const result = location.pathname; // Returns '/en-US/docs/Web'

Spezifikationen

Specification
HTML
# dom-workerlocation-pathname

Browser-Kompatibilität

Siehe auch