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 28801 - Define self.origin. Documents and workers should have a reliable way to get the origin of the global. See https://bugzilla.mozilla.org/show_bug.cgi?id=931884#c12 for some background.
Summary: Define self.origin. Documents and workers should have a reliable way to get t...
Status: RESOLVED MOVED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: https://html.spec.whatwg.org/#environ...
Whiteboard:
Keywords:
: 27497 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-06-12 07:22 UTC by contributor
Modified: 2016-03-28 15:31 UTC (History)
4 users (show)

See Also:


Attachments

Description contributor 2015-06-12 07:22:29 UTC
Specification: https://html.spec.whatwg.org/multipage/webappapis.html
Multipage: https://html.spec.whatwg.org/multipage/#environment-settings-object
Complete: https://html.spec.whatwg.org/#environment-settings-object
Referrer: https://html.spec.whatwg.org/multipage/

Comment:
Define self.origin. Documents and workers should have a reliable way to get
the origin of the global. See
https://bugzilla.mozilla.org/show_bug.cgi?id=931884#c12 for some background.

Posted from: 195.12.41.182 by annevk@annevk.nl
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:41.0) Gecko/20100101 Firefox/41.0
Comment 1 Anne 2015-08-31 07:22:22 UTC
*** Bug 27497 has been marked as a duplicate of this bug. ***
Comment 2 Anne 2016-03-28 14:13:09 UTC
Domenic, what do you think about putting members of WindowBase64, WindowTimers, and ImageBitmapFactories, all on a new Global mixin introduced somewhere in section 8. Maybe as a <h3> before base64.

That mixin can then be used to define fetch() and other fetch()-like features, such as the origin feature described here.
Comment 3 Domenic Denicola 2016-03-28 14:19:17 UTC
That sounds pretty good. I think `GlobalUtils` might be a good name; just `Global` is a bit confusing IMO (but no big deal).

So all those sections would be converted to use `partial interface GlobalUtils {`, and the `implements` would be in the definition of `GlobalUtils`? Seems nice. Console Spec could also use this.

It's worth noting that Houdini worklets are planning to offer a more restricted type of global that doesn't have timers, base64, or ImageBitmap stuff---just console. https://drafts.css-houdini.org/worklets/#workletglobalscope
Comment 4 Anne 2016-03-28 14:24:52 UTC
I think I'll avoid partial and just list the members directly (probably separated by a newline for those defined in different sections) given our issues with partial and html-build.

We could also name this WindowWorkerUtils if we want to avoid giving the impression it's for all globals.
Comment 5 Anne 2016-03-28 15:31:56 UTC
https://github.com/whatwg/html/pull/951