Show More
@@ -422,6 +422,14 b' IPython.utils = (function (IPython) {' | |||||
422 | }; |
|
422 | }; | |
423 |
|
423 | |||
424 | var parse_url = function (url) { |
|
424 | var parse_url = function (url) { | |
|
425 | // an `a` element with an href allows attr-access to the parsed segments of a URL | |||
|
426 | // a = parse_url("http://localhost:8888/path/name#hash") | |||
|
427 | // a.protocol = "http:" | |||
|
428 | // a.host = "localhost:8888" | |||
|
429 | // a.hostname = "localhost" | |||
|
430 | // a.port = 8888 | |||
|
431 | // a.pathname = "/path/name" | |||
|
432 | // a.hash = "#hash" | |||
425 | var a = document.createElement("a"); |
|
433 | var a = document.createElement("a"); | |
426 | a.href = url; |
|
434 | a.href = url; | |
427 | return a; |
|
435 | return a; |
General Comments 0
You need to be logged in to leave comments.
Login now