Drafts Script Reference
    Preparing search index...

    Class URL

    URL objects are used as a convenience in parsing values out of a URL string. This implementation closely mirrors the Web API's URL object for compatibility purposes

    let url = URL.parse("http://getdrafts.com?q=boo")
    let host = url.host // "getdrafts.com"
    let q = url.searchParams["q"] // "boo"
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    fragment: string

    The hash string starting with a # of the URL, if present. When setting, if the string does not begin with a # it will be added, and the value

    hostname: string

    Host (domain name) portion of the URL

    Methods

    • Creates a new URL object with provided URL.

      Parameters

      • url: string

        A string representing an absolute URL or a relative reference to a base URL. If url is a relative reference, base is required.

      • Optionalbase: string

        A string representing the base URL to resolve against if url is a relative reference.

      Returns URL

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.