WorkerLocation.pathname

The pathname property of a WorkerLocation object returns the pathname part of the worker’s location.

Syntax

string = object.pathname;

Examples

// In a Web worker, on the page https://developer.mozilla.org/en-US/WorkerLocation.pathname
var result = window.self.pathname; // Returns:'/en-US/WorkerLocation.pathname'

Specifications

Specification Status Comment
HTML Living Standard
The definition of 'WorkerLocation.pathname' in that specification.
Living Standard Initial definition.

Browser compatibility

BCD tables only load in the browser

See also