Skip to content

HTML5 Location API Implementation for Blazor without any JavaScript dependency.

License

Notifications You must be signed in to change notification settings

arivera12/BlazorLocation

Repository files navigation

BlazorLocation

HTML5 Location API for Blazor without any JavaScript Library Dependency.

This package wraps HTML5 Location APIs.

Installation

Install-Package BlazorLocation -Version 1.0.0

Register the service in your services method

services.AddBlazorLocation();

No javascript library reference dependency

This library has no javascript library reference dependency.

Usage

[Inject] IBlazorLocationService BlazorLocation { get; set; }

BlazorHistory Methods

BlazorLocation Method
Read-only property of the Location interface is a static DOMStringList containing AncestorOrigins()
The hash property of the Location interface returns a USVString containing a '#' followed by the fragment identifier of the URL Hash()
The hash property of the Location interface returns a USVString containing a '#' followed by the fragment identifier of the URL Hash(string value)
The host property of the Location interface is a USVString containing the host, that is the hostname, and then, if the port of the URL is nonempty, a ':', and the port of the URL. Host()
The host property of the Location interface is a USVString containing the host, that is the hostname, and then, if the port of the URL is nonempty, a ':', and the port of the URL. Host(string value)
The hostname property of the Location interface is a USVString containing the domain of the URL. Hostname()
The hostname property of the Location interface is a USVString containing the domain of the URL. Hostname(string value)
The href property of the Location interface is a stringifier that returns a USVString containing the whole URL, and allows the href to be updated. Href()
The href property of the Location interface is a stringifier that returns a USVString containing the whole URL, and allows the href to be updated. Href(string value)
The origin read-only property of the Location interface is a USVString containing the Unicode serialization of the origin of the represented URL. Origin()
The password property of the Location interface is a USVString containing the password specified before the domain name. Password()
The password property of the Location interface is a USVString containing the password specified before the domain name. Password(string value)
The port property of the Location interface is a USVString containing the port number of the URL. If the URL does not contain an explicit port number, it will be set to ''. Port()
The port property of the Location interface is a USVString containing the port number of the URL. If the URL does not contain an explicit port number, it will be set to ''. Port(string value)
The protocol property of the Location interface is a USVString representing the protocol scheme of the URL, including the final ':'. Protocol()
The protocol property of the Location interface is a USVString representing the protocol scheme of the URL, including the final ':'. Protocol(string value)
The search property of the Location interface is a search string, also called a query string; that is, a USVString containing a '?' followed by the parameters of the URL. Search()
The search property of the Location interface is a search string, also called a query string; that is, a USVString containing a '?' followed by the parameters of the URL. Search(string value)
The username property of the Location interface is a USVString containing the username specified before the domain name. Username()
The username property of the Location interface is a USVString containing the username specified before the domain name. Username(string value)
The protocol property of the Location interface is a USVString representing the protocol scheme of the URL, including the final ':'. Protocol(string value)
This method causes the window to load and display the document at the URL specified. Assign(string url)
This method reloads the current URL, like the browser refresh button. Reload()
The replace method of the Location interface replaces the current resource with the one at the provided URL. Replace(string url)
This stringifier method of the Location interface returns a USVString containing the whole URL. It is a read-only version of Location.href. ToString()

License

MIT

About

HTML5 Location API Implementation for Blazor without any JavaScript dependency.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published