From 42092f163b2f7be97b6fad3d127027984e3d703b Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 3 Jun 2012 11:12:21 +0200 Subject: [PATCH] Ox.parseURL: update docs & examples --- source/Ox/js/String.js | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/source/Ox/js/String.js b/source/Ox/js/String.js index 5f9c47fa..a5196ac4 100644 --- a/source/Ox/js/String.js +++ b/source/Ox/js/String.js @@ -169,25 +169,30 @@ Ox.parseSRT = function(string, fps) { /*@ Ox.parseURL Takes a URL, returns its components (url) -> URL components + hash Hash + host Host + hostname Hostname + origin Origin + pathname Pathname + port Port + protocol Protocol + search Search url URL - - > Ox.test.object.hash + > Ox.parseURL('http://www.foo.com:8080/bar/index.html?a=0&b=1#c').hash '#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' - > Ox.test.object.hostname + > Ox.parseURL('http://www.foo.com:8080/bar/index.html?a=0&b=1#c').hostname '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' - > Ox.test.object.pathname + > Ox.parseURL('http://www.foo.com:8080/bar/index.html?a=0&b=1#c').pathname '/bar/index.html' - > Ox.test.object.port + > Ox.parseURL('http://www.foo.com:8080/bar/index.html?a=0&b=1#c').port '8080' - > Ox.test.object.protocol + > Ox.parseURL('http://www.foo.com:8080/bar/index.html?a=0&b=1#c')protocol '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' @*/ Ox.parseURL = (function() {