package js_of_ocaml
Module Url.CurrentSource
This module can be used to handle the Url associated to the current document.
The host part of the current url.
The port of the current url.
The protocol of the current url.
The path of the current url as one long string.
The path of the current url as a list of small string.
The arguments of the current url as an association list.
Because the fragment of the Url for the current document can change dynamically, we use a functional value here.
set_fragment s replaces the current fragment by s.
get () returns a value of type url with fields reflecting the state of the current Url.
set u replaces the current Url for u. WARNING: Causes the document to change.
as_string is the original string representation of the current Url. It is NOT necessarily equals to string_of_url (get ()) but url_of_string as_string = get () holds.