WorkerLocation object

Contains the location of the worker.

Syntax


 self.location 

DOM Information

Inheritance Hierarchy

The WorkerLocation does not inherit from any class or interface.

Members

The WorkerLocation object has these types of members:

Properties

The WorkerLocation object has these properties.

PropertyAccess typeDescription

hash

Read-only

Contains the anchor portion of the URL including the hash sign (#).

host

Read-only

Contains the hostname and port values of the URL.

hostname

Read-only

Contains the hostname of a URL.

href

Read-only

Contains the hypertext reference (HREF) of the URL.

pathname

Read-only

Contains the pathname of the URL.

port

Read-only

Contains the port number of the URL.

protocol

Read-only

Contains the protocol of the URL.

search

Read-only

Contains the query part of the URL, including the question mark.

 

Remarks

The WorkerLocation object is created by using the self.location method inside a worker thread. The self object is a reference to the WorkerGlobalScope object.

The WorkerLocation object can decompose the URL into the following component properties: href, protocol, host, hostname, port, pathname, search, and hash.The href property contains the absolute URL of the worker at its creation.

 

 

Show:
© 2014 Microsoft