2. What’s
navigator.registerProtocolHandler?
● The feature is to give the power to add your customized scheme(a.k.a
protocol) to your website or web application
● If you register your own custom scheme, it can help you to avoid collisions
with other DNS, or help other people use it correctly
- Spec URL: https://html.spec.whatwg.org/multipage/webappapis.html#custom-handlers
3. How is the support in Chromium?
<html>
<head>
<script>
navigator.registerProtocolHandler(
"web+github",
"https://gyuyoung.github.io/CustomSchemeExample/url=%s",
"github handler");
</script>
</head>
<body>
<p>If you click this link, it runs <code>web+github:</code> protocol:
<a href="web+github:gyuyoung">this</a></p>
</body>
</html>
4. How many users have used it?
● Fortunately, this feature
usage ratio exceeds 0.01%
5. What problems were fixed recently?
● This feature is still being maintained
○ [registerProtocolHandler] Only substitute the first "%s" placeholder
○ [Custom Scheme] Remove 'title' parameter in the tests of
unregisterProtocolHandler
○ [registerProtocolHandler] Add a unit test for percent-encoding
○ And so on...
6. What’s the next?
● Continue following the latest w3c specification
● How to handle security issues?
○ Hijacking, registration spamming, misleading titles, and so on.
● Is “isProtocolHandlerRegistered” needed?