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

Commit

Permalink
Merge pull request #38 from PolymerElements/document-current-script
Browse files Browse the repository at this point in the history
Better non-Chrome compatability
  • Loading branch information
addyosmani committed Jun 4, 2015
2 parents f8c56e3 + e805aef commit 34188bf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
7 changes: 4 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "platinum-sw",
"private": true,
"version": "1.0.0",
"version": "1.0.1",
"license": "http://polymer.github.io/LICENSE.txt",
"authors": [
"The Polymer Authors"
],
"description": "Service worker helper elements.",
"main":"platinum-sw-elements.html",
"main": "platinum-sw-elements.html",
"keywords": [
"caching",
"offline",
Expand All @@ -31,6 +31,7 @@
"devDependencies": {
"iron-component-page": "PolymerElements/iron-component-page#^1.0.2",
"marked-element": "PolymerElements/marked-element#^1.0.0",
"web-component-tester": "*"
"web-component-tester": "*",
"fetch": "^0.9.0"
}
}
1 change: 1 addition & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Platinum Service Worker Elements Demo</title>

<script src="../../fetch/fetch.js"></script>
<script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="../platinum-sw-elements.html">
<link rel="import" href="../../marked-element/marked-element.html">
Expand Down
4 changes: 3 additions & 1 deletion platinum-sw-register.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
<script>
(function() {
// Grab the URI of this file to use as a base when resolving relative paths.
var baseURI = document.currentScript.baseURI;
// Fallback to './' as a default, though current browsers that don't support
// document.currentScript also don't support service workers.
var baseURI = document.currentScript ? document.currentScript.baseURI : './';

/**
* The `<platinum-sw-register>` element handles
Expand Down

0 comments on commit 34188bf

Please sign in to comment.