PSA: You can use `self.origin` in windows and workers starting in Firefox 54 thanks to @bz_moz.https://bugzilla.mozilla.org/show_bug.cgi?id=1306170 …
-
-
Replying to @wanderview @bz_moz
We're already using `self.location.origin` inside of a SW (e.g. https://github.com/GoogleChrome/sw-helpers/blob/master/packages/sw-routing/src/lib/express-route.js#L79 …). Any reason to switch?
2 replies 0 retweets 0 likes -
Replying to @jeffposnick @wanderview
In general, `location.origin` may not match `location.origin`. `location.origin` is the origin of the URL.
1 reply 0 retweets 0 likes -
I can't speak to the SW case, but for <iframe sandbox src="http://example.com ">, they are quite different.
3 replies 0 retweets 0 likes -
Or for an about:blank iframe, for that matter. Or <iframe srcdoc>.
1 reply 0 retweets 0 likes
So if your semantics are "what is my url?" use location.origin. If they're "what is my origin?" use self.origin.
6:57 AM - 14 Feb 2017
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.