This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27875 - Abstract the parts of window.open that deal with about:blank
Summary: Abstract the parts of window.open that deal with about:blank
Status: RESOLVED WONTFIX
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-21 15:11 UTC by Jake Archibald
Modified: 2017-07-21 10:43 UTC (History)
2 users (show)

See Also:


Attachments

Description Jake Archibald 2015-01-21 15:11:07 UTC
Within a ServiceWorker's global scope, there's clients.openWindow(url) which returns a promise indicating success/failure.

This allows a ServiceWorker to open a window in reaction to particular interaction events, of which is currently only notificationclick.

Currently I'm having to duplicate step 12 of https://html.spec.whatwg.org/multipage/browsers.html#dom-open, can this be abstracted out to avoid duplication?

The ServiceWorker can open pages from any origin (although it may not control the loading of it), so opening "about:blank" is allowed unless we specifically disallow it.
Comment 1 Anne 2015-09-01 08:56:02 UTC
Jake, if you could, a PR with some additional context would be appreciated.
Comment 2 Anne 2017-07-21 10:43:34 UTC
Closing per IRC discussion. Jake will create a PR when the need comes up.