-
Notifications
You must be signed in to change notification settings - Fork 0
URL State Machine
The URL parser uses the state machine described in the WHATWG URL specification to parse the input. The default state is the Scheme Start State. The starting state can change based on which of the URL's setters is used. An image of the state machine can be seen below.
When input is passed to URL's constructor or URL's href setter, the state machine begins in the default state, Scheme Start State.
When setting URL's protocol attribute, the state machine begins in the Scheme Start state.
URL's username and password attribute setters do not use the state machine.
When setting URL's host or hostname attributes, the state machine will begin in the Host or Hostname States, respectively.
When setting URL's port attribute, the state machine will begin in the Port State.
When setting URL's pathname attribute, the state machine will begin in the Path Start State.
When setting URL's search attribute, the state machine will begin in the Query State.
When setting URL's hash attribute, the state machine will begin in the Fragment State.
