Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /websockets/Create-invalid-urls.any.html - WPT Dashboard Interop Dashboard
- /websockets/Create-invalid-urls.any.worker.html - WPT Dashboard Interop Dashboard
[
"ftp://"+location.host+"/",
"mailto:example@example.org",
"about:blank",
location.origin + "/#",
location.origin + "/#test",
"#test"
].forEach(input => {
test(() => {
assert_throws_dom("SyntaxError", () => new WebSocket(input));
}, `new WebSocket("${input}") should throw a "SyntaxError" DOMException`);
});