New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fate of registerProtocolHandler() / registerContentHandler() and friends? #630

Closed
annevk opened this Issue Feb 5, 2016 · 5 comments

Comments

5 participants
@annevk
Member

annevk commented Feb 5, 2016

See also #198.

Both of these methods are rather poorly implemented. Are they used to the extent that we need to keep them? Should they be improved?

@domenic

This comment has been minimized.

Show comment
Hide comment
@domenic

domenic Feb 5, 2016

Member

I use them on every new computer for mailto: (Inbox/Gmail) and irc:/ircs: (IRCCloud), in both Chrome and Firefox. I don't really understand what the problem is.

Member

domenic commented Feb 5, 2016

I use them on every new computer for mailto: (Inbox/Gmail) and irc:/ircs: (IRCCloud), in both Chrome and Firefox. I don't really understand what the problem is.

@annevk

This comment has been minimized.

Show comment
Hide comment
@annevk

annevk Feb 6, 2016

Member

Is registerContentHandler() implemented? Are the remaining four methods? Are they supported as part of Fetch or navigate? (Last I checked not consistent across implementations.)

I think you're correct though that at least registerProtocolHandler() has its use.

Member

annevk commented Feb 6, 2016

Is registerContentHandler() implemented? Are the remaining four methods? Are they supported as part of Fetch or navigate? (Last I checked not consistent across implementations.)

I think you're correct though that at least registerProtocolHandler() has its use.

@jscinoz

This comment has been minimized.

Show comment
Hide comment
@jscinoz

jscinoz Jun 8, 2016

If we were to specify that these are supported as part of Fetch (in addition to navigation), and as a result, could be handled by service workers, I can think of at least a few use cases that wouldn't otherwise be possible:

  • Service worker protocol handlers - e.g: implement a SW that handles magnet: URIs and uses feross/webtorrent to retrieve content, without the caller needing any understanding of BitTorrent specifics.
  • Service worker content handlers - e.g: implement a SW that handles image/bpg and can transparently convert to image/png in browsers lacking native support.

There would, of course, need to be some thought & discussion around the security & permissions model for this

jscinoz commented Jun 8, 2016

If we were to specify that these are supported as part of Fetch (in addition to navigation), and as a result, could be handled by service workers, I can think of at least a few use cases that wouldn't otherwise be possible:

  • Service worker protocol handlers - e.g: implement a SW that handles magnet: URIs and uses feross/webtorrent to retrieve content, without the caller needing any understanding of BitTorrent specifics.
  • Service worker content handlers - e.g: implement a SW that handles image/bpg and can transparently convert to image/png in browsers lacking native support.

There would, of course, need to be some thought & discussion around the security & permissions model for this

@joshtriplett

This comment has been minimized.

Show comment
Hide comment
@joshtriplett

joshtriplett Sep 27, 2016

I'm strongly interested in continued availability of registerProtocolHandler.

joshtriplett commented Sep 27, 2016

I'm strongly interested in continued availability of registerProtocolHandler.

@annevk

This comment has been minimized.

Show comment
Hide comment
@annevk

annevk Sep 8, 2017

Member

For Live DOM Viewer:

<script>
["registerProtocolHandler",
 "registerContentHandler",
 "isProtocolHandlerRegistered",
 "isContentHandlerRegistered",
 "unregisterProtocolHandler",
 "unregisterContentHandler"].forEach(val => {
  w(navigator[val] !== undefined)
})
</script>

Edge and Safari support none of them.

Firefox supports registerProtocolHandler and registerContentHandler (and the latter only for a select set of RSS-related MIME types). Chrome supports registerProtocolHandler and unregisterProtocolHandler.

I'm happy to wait a little longer with registerProtocolHandler and maybe unregisterProtocolHandler, but the rest should really be removed at this point. Will work on a PR.

Member

annevk commented Sep 8, 2017

For Live DOM Viewer:

<script>
["registerProtocolHandler",
 "registerContentHandler",
 "isProtocolHandlerRegistered",
 "isContentHandlerRegistered",
 "unregisterProtocolHandler",
 "unregisterContentHandler"].forEach(val => {
  w(navigator[val] !== undefined)
})
</script>

Edge and Safari support none of them.

Firefox supports registerProtocolHandler and registerContentHandler (and the latter only for a select set of RSS-related MIME types). Chrome supports registerProtocolHandler and unregisterProtocolHandler.

I'm happy to wait a little longer with registerProtocolHandler and maybe unregisterProtocolHandler, but the rest should really be removed at this point. Will work on a PR.

annevk added a commit that referenced this issue Sep 8, 2017

Remove registerContentHandler() and several friends
They have seen extremely poor adoption unfortunately and were not implemented in line with the standard.

Fixes #630.

@annevk annevk closed this in #3027 Sep 14, 2017

annevk added a commit that referenced this issue Sep 14, 2017

Remove registerContentHandler() and several friends
They have seen extremely poor adoption unfortunately and were not implemented in line with the standard.

Tests: web-platform-tests/wpt#7349.

Fixes #630.

MXEBot pushed a commit to mirror/chromium that referenced this issue Nov 24, 2017

Gyuyoung Kim Commit Bot
[Custom Scheme] Remove isProtocolHandlerRegistered in the NavigatorCo…
…ntentUtils of blink

isProtocolHandlerRegistered has been existed in blink. However, latest custom scheme whatwg
specfication removed it.

- whatwg: https://html.spec.whatwg.org/multipage/system-state.html#custom-handlers
- whatwg issue: whatwg/html#630
- commit to remove it: whatwg/html@b143dbc

The reason to remove it was that no browsers have supported the function. So it would be good
if we remove it from blink in order to reduce our maintanance overhead.

Bug: 121825
Change-Id: I3e99dd5996e55dedcd8b5d47a7103410acfd24eb
Reviewed-on: https://chromium-review.googlesource.com/784653
Commit-Queue: Gyuyoung Kim <gyuyoung.kim@lge.com>
Reviewed-by: Mike Lawther <mikelawther@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518981}

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Nov 24, 2017

[Custom Scheme] Remove isProtocolHandlerRegistered in the NavigatorCo…
…ntentUtils of blink

isProtocolHandlerRegistered has been existed in blink. However, latest custom scheme whatwg
specfication removed it.

- whatwg: https://html.spec.whatwg.org/multipage/system-state.html#custom-handlers
- whatwg issue: whatwg/html#630
- commit to remove it: whatwg/html@b143dbc

The reason to remove it was that no browsers have supported the function. So it would be good
if we remove it from blink in order to reduce our maintanance overhead.

Bug: 121825
Change-Id: I3e99dd5996e55dedcd8b5d47a7103410acfd24eb
Reviewed-on: https://chromium-review.googlesource.com/784653
Commit-Queue: Gyuyoung Kim <gyuyoung.kim@lge.com>
Reviewed-by: Mike Lawther <mikelawther@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518981}

chromium-wpt-export-bot added a commit to web-platform-tests/wpt that referenced this issue Nov 24, 2017

[Custom Scheme] Remove isProtocolHandlerRegistered in the NavigatorCo…
…ntentUtils of blink

isProtocolHandlerRegistered has been existed in blink. However, latest custom scheme whatwg
specfication removed it.

- whatwg: https://html.spec.whatwg.org/multipage/system-state.html#custom-handlers
- whatwg issue: whatwg/html#630
- commit to remove it: whatwg/html@b143dbc

The reason to remove it was that no browsers have supported the function. So it would be good
if we remove it from blink in order to reduce our maintanance overhead.

Bug: 121825
Change-Id: I3e99dd5996e55dedcd8b5d47a7103410acfd24eb
Reviewed-on: https://chromium-review.googlesource.com/784653
Commit-Queue: Gyuyoung Kim <gyuyoung.kim@lge.com>
Reviewed-by: Mike Lawther <mikelawther@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518981}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment