Location Class
https://html.spec.whatwg.org/multipage/nav-history-apis.html#the-location-interface. The fragment navigations are performed synchronously; the other navigations use BrowsingContextOptions.DocumentLoader and are ignored when there is none.
public sealed class LocationRemarks
The URLs given to href, assign() and replace() are resolved against the entry document (the document of the running script, or the relevant document outside a script). The scripting bindings check that the members other than the setter of Location.Href and Location.Replace are accessed by a same origin-domain realm.
See also
Properties
| Name | Description |
|---|---|
| AncestorOrigins | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-ancestororigins: the ancestor origins list of the relevant document. |
| Hash | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-hash |
| Host | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-host |
| Hostname | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-hostname |
| Href | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-href |
| Origin | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-origin |
| Pathname | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-pathname |
| Port | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-port |
| Protocol | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-protocol |
| Search | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-search |
AncestorOrigins
Location.cshttps://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-ancestororigins: the ancestor origins list of the relevant document.
public DomStringList AncestorOrigins { get; }Hash
Location.cshttps://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-hash
public string Hash { get; set; }Property value
See also
Host
Location.cshttps://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-host
public string Host { get; set; }Property value
See also
Hostname
Location.cshttps://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-hostname
public string Hostname { get; set; }Property value
See also
Href
Location.cshttps://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-href
public string Href { get; set; }Property value
See also
Origin
Location.cshttps://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-origin
public string Origin { get; }Property value
See also
Pathname
Location.cshttps://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-pathname
public string Pathname { get; set; }Property value
See also
Port
Location.cshttps://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-port
public string Port { get; set; }Property value
See also
Protocol
Location.cshttps://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-protocol
public string Protocol { get; set; }Property value
See also
Search
Location.cshttps://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-search
public string Search { get; set; }Property value
See also
Methods
| Name | Description |
|---|---|
| Assign(string) | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-assign |
| Reload() | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-reload |
| Replace(string) | https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-replace |
| ToString() | Returns a string that represents the current object. |
Assign(string)
Location.cshttps://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-assign
Reload()
Location.cshttps://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-reload
public void Reload()Replace(string)
Location.cshttps://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-location-replace