Lines Matching defs:url
5 if(type === "url") {
8 const url = document.createElement(type)
9 url.href = input
10 return url
20 const typeName = { "url": "URL", "a": "<a>", "area": "<area>" }
21 ;["url", "a", "area"].forEach((type) => {
24 const url = makeURL("url", hostTest.input)
25 assert_equals(url.host, hostTest.output)
26 assert_equals(url.hostname, hostTest.output)
27 assert_equals(url.pathname, "/x")
28 assert_equals(url.href, "https://" + hostTest.output + "/x")
30 if(type === "url") {
31 assert_throws_js(TypeError, () => makeURL("url", hostTest.input))
33 const url = makeURL(type, hostTest.input)
34 assert_equals(url.host, "")
35 assert_equals(url.hostname, "")
36 assert_equals(url.pathname, "")
37 assert_equals(url.href, "https://" + hostTest.input + "/x")
43 const url = makeURL(type, "x")
44 url[val] = hostTest.input
46 assert_equals(url[val], hostTest.output)
48 assert_equals(url[val], "x")