Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Use document._currentScript when available #85

Merged
merged 2 commits into from
Dec 11, 2015
Merged

Conversation

jeffposnick
Copy link
Contributor

R: @addyosmani @wibblymat @gauntface @ebidel
CC: @wanderview

The nested conditional ternary operators are ugly, but I've got a few scenarios I need to deal with now:

  1. document._currentScript is set, because we've got the HTML Imports polyfill loaded and we're on a browser that supports document.currentScript in general.
  2. document._currentScript isn't set, but document.currentScript is, because we don't have the polyfill loaded.
  3. Neither document._currentScript nor document.currentScript are set, because we're in a browser that doesn't support document.currentScript, i.e. IE.

Closes #81.

@wibblymat
Copy link
Contributor

Assuming that the Travis failure is unrelated, :shipit: 👍

@gauntface
Copy link

LGTM on the change - assuming that travis is just throwing a funny.

@jeffposnick
Copy link
Contributor Author

The Travis thing has been going on for a while, and is resolved by #84

jeffposnick added a commit that referenced this pull request Dec 11, 2015
Use document._currentScript when available
@jeffposnick jeffposnick merged commit 4cfa76a into master Dec 11, 2015
@jeffposnick jeffposnick deleted the firefox-base-uri-fix branch December 11, 2015 15:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants