Ox.parseURL: update docs & examples
This commit is contained in:
parent
9ce126263b
commit
42092f163b
1 changed files with 16 additions and 11 deletions
|
@ -169,25 +169,30 @@ Ox.parseSRT = function(string, fps) {
|
||||||
/*@
|
/*@
|
||||||
Ox.parseURL <f> Takes a URL, returns its components
|
Ox.parseURL <f> Takes a URL, returns its components
|
||||||
(url) -> <o> URL components
|
(url) -> <o> URL components
|
||||||
|
hash <s> Hash
|
||||||
|
host <s> Host
|
||||||
|
hostname <s> Hostname
|
||||||
|
origin <s> Origin
|
||||||
|
pathname <s> Pathname
|
||||||
|
port <s> Port
|
||||||
|
protocol <s> Protocol
|
||||||
|
search <s> Search
|
||||||
url <s> URL
|
url <s> URL
|
||||||
<script>
|
> Ox.parseURL('http://www.foo.com:8080/bar/index.html?a=0&b=1#c').hash
|
||||||
Ox.test.object = Ox.parseURL('http://www.foo.com:8080/bar/index.html?a=0&b=1#c');
|
|
||||||
</script>
|
|
||||||
> Ox.test.object.hash
|
|
||||||
'#c'
|
'#c'
|
||||||
> Ox.test.object.host
|
> Ox.parseURL('http://www.foo.com:8080/bar/index.html?a=0&b=1#c').host
|
||||||
'www.foo.com:8080'
|
'www.foo.com:8080'
|
||||||
> Ox.test.object.hostname
|
> Ox.parseURL('http://www.foo.com:8080/bar/index.html?a=0&b=1#c').hostname
|
||||||
'www.foo.com'
|
'www.foo.com'
|
||||||
> Ox.test.object.origin
|
> Ox.parseURL('http://www.foo.com:8080/bar/index.html?a=0&b=1#c').origin
|
||||||
'http://www.foo.com:8080'
|
'http://www.foo.com:8080'
|
||||||
> Ox.test.object.pathname
|
> Ox.parseURL('http://www.foo.com:8080/bar/index.html?a=0&b=1#c').pathname
|
||||||
'/bar/index.html'
|
'/bar/index.html'
|
||||||
> Ox.test.object.port
|
> Ox.parseURL('http://www.foo.com:8080/bar/index.html?a=0&b=1#c').port
|
||||||
'8080'
|
'8080'
|
||||||
> Ox.test.object.protocol
|
> Ox.parseURL('http://www.foo.com:8080/bar/index.html?a=0&b=1#c')protocol
|
||||||
'http:'
|
'http:'
|
||||||
> Ox.test.object.search
|
> Ox.parseURL('http://www.foo.com:8080/bar/index.html?a=0&b=1#c').search
|
||||||
'?a=0&b=1'
|
'?a=0&b=1'
|
||||||
@*/
|
@*/
|
||||||
Ox.parseURL = (function() {
|
Ox.parseURL = (function() {
|
||||||
|
|
Loading…
Reference in a new issue