Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Locational

URLの情報を管理するクラス

version

0.7.0

since

0.7.0

Hierarchy

  • Locational

Index

Constructors

constructor

  • new Locational(originalLocation: Location | HTMLAnchorElement | HTMLAreaElement): Locational
  • コンストラクタ

    version

    0.7.0

    since

    0.7.0

    Parameters

    • originalLocation: Location | HTMLAnchorElement | HTMLAreaElement

    Returns Locational

Properties

hash

hash: string

hash

host

host: string

ex) www.sample.com:80

hostname

hostname: string

ex) www.sample.com

href

href: string

origin

origin: string

params

params: object

ex) { "key": "value", "key2": "value" }

Type declaration

  • [index: string]: string | string[]

path

path: string

ex) /path/dir/file.ext?key=value&key2=value#hash

pathname

pathname: string

/path/dir/file.ext

port

port: string

ex) 80

protocol

protocol: string

ex) http:

query

query: string

ex) key=value&key2=value

search

search: string

?key=value&key2=value

Methods

addParam

  • addParam(key: string, value?: string | string[]): Locational

removeParam

toString

  • toString(): string

update

Static parseQueryString

  • parseQueryString(queryString: string): object
  • クエリーストリングをハッシュにして返す

    version

    0.7.0

    since

    0.7.0

    Parameters

    • queryString: string

    Returns object

    • [index: string]: string | string[]

Generated using TypeDoc