Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /urlpattern/urlpattern-constructor.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(() => {
assert_throws_js(TypeError, () => { new URLPattern('(\\'); } );
}, `Test unclosed token`);
test(() => {
new URLPattern(undefined, undefined);
}, `Test constructor with undefined`);
</script>