FORGE. URL

new URL(urlopt)

Utility for URL.
Parameters:
Name Type Attributes Description
url string <optional>
The URL to use.
Source:
To Do:
  • exists method is a POC

Extends

Members

(readonly) alive :boolean

Get the alive flag value of the object.
Type:
  • boolean
Inherited From:
Source:

(readonly) className :string

Get the class name of the object.
Type:
  • string
Inherited From:
Source:

data :*

Get and set any custom data you want to associate to this object.
Type:
  • *
Inherited From:
Source:

debug :boolean

Get and set the debug flag.
Type:
  • boolean
Inherited From:
Source:

(readonly) extension :string

Get the extension of the URL.
Type:
  • string
Source:

(readonly) hash :string

Get the hash of the URL.
Type:
  • string
Source:

(readonly) hashParameters :Object

Get the hash parameters of the URL.
Type:
  • Object
Source:

(readonly) host :string

Get the host of the URL.
Type:
  • string
Source:

(readonly) onDestroy :FORGE.EventDispatcher

Get the onDestroy FORGE.EventDispatcher, this event is emitted at the end of the destroy sequence.
Type:
Inherited From:
Source:

(readonly) path :string

Get the path of the URL.
Type:
  • string
Source:

(readonly) port :string

Get the port of the URL.
Type:
  • string
Source:

(readonly) protocol :string

Get the protocol of the URL.
Type:
  • string
Source:

(readonly) query :string

Get the query of the URL.
Type:
  • string
Source:

(readonly) tags :Array

Get the tags associated to this object.
Type:
  • Array
Inherited From:
Source:

(readonly) uid :string

Get the uid of the object.
Type:
  • string
Inherited From:
Source:

(readonly) url :string

Get the full URL.
Type:
  • string
Source:

warning :boolean

Get and set the warning flag.
Type:
  • boolean
Inherited From:
Source:

Methods

(static) exists(url, success, fail, context)

Check if a given url exists. Beware of cross domain, work only on the same domain.
Parameters:
Name Type Description
url string The URL to test.
success function The callback to call when test is succeed.
fail function The callback to call when test is failed.
context Object The context in which to call the callback.
Source:

(static) isValid(url) → {boolean}

Check if a URL is valid. Works only for absolute URLs.
Parameters:
Name Type Description
url string The URL to test.
Source:
Returns:
Returns true if URL is valid.
Type
boolean

(static) parse(urlopt) → {FORGE.URL}

Parse the given URL.
Parameters:
Name Type Attributes Description
url string <optional>
The URL to parse.
Source:
Returns:
Returns the a new FORGE.URL with parsed data.
Type
FORGE.URL

destroy()

Basic destroy method, prevent double destroy, change the alive flag.
Inherited From:
Source:

log(value)

Basic log method, log a string in the console if debug is enabled.
Parameters:
Name Type Description
value * The value you want to log in the console.
Inherited From:
Source:

warn(valuenullable)

Basic warn method, log a warn string in the console if warning is enabled.
Parameters:
Name Type Attributes Description
value string | Object <nullable>
The value you want to warn in the console.
Inherited From:
Source:

FORGE. URL

Members
Methods