Name
getFragment — Return the fragment extracted from a URL
Usage
URL.getFragment(url)
: Stringurl
Description
Returns the fragment part extracted from
url
. Both absolute and relative URLs are
supported. Returns the empty string if url
doesn’t include a fragment.
Returns invalid
if url
can’t be converted to a string or can’t be parsed as a
URL.
Examples
URL.getFragment("#frag")
returns string "frag"
URL.getFragment("foo.wml#card2")
returns string "card2"
URL.getFragment("../logo.wbmp")
returns string ""
URL.getFragment("http://www.inhand.net:xxx/")
returns invalid
URL.getFragment(invalid)
returns invalid
Get Learning WML, and WMLScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.