Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 18 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.tentative.https.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset='utf-8'>
<title>protocol handlers</title>
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<script>
// This should be merged into protocol.https.html when/if
[
'cabal',
'dat',
'did',
'dweb',
'ethereum',
'hyper',
'ipfs',
'ipns',
'ssb',
].forEach(scheme => {
test(() => {
navigator.registerProtocolHandler(scheme, location.href + '/%s', "foo");
}, 'registerProtocolHandler: overriding the "' + scheme + '" protocol should work');
test(() => {
navigator.unregisterProtocolHandler(scheme, location.href + '/%s');
}, 'unregisterProtocolHandler: overriding the "' + scheme + '" protocol should work');
});
</script>