Skip to content

Commit

Permalink
Merge pull request #2584 from Polymer/2582-kschaaf-ie-regressions
Browse files Browse the repository at this point in the history
Fix IE10 regressions. Fixes #2582
  • Loading branch information
Steve Orvell committed Oct 16, 2015
2 parents e2d8446 + ef366c5 commit 8080a30
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
language: node_js
sudo: false
cache:
directories:
- node_modules
matrix:
include:
- node_js: stable
Expand All @@ -21,7 +18,8 @@ matrix:
wct --simpleOutput -s 'Windows 10/microsoftedge' -s 'Windows 8.1/internet explorer@11' -s 'Windows 7/internet explorer@10' -s 'OS X 10.10/safari@8' -s 'OS X 10.9/safari@7'
fi
before_script:
- npm install bower web-component-tester
- npm install bower
- npm install web-component-tester
- export PATH=$PWD/node_modules/.bin:$PATH
- bower install
env:
Expand Down
7 changes: 5 additions & 2 deletions src/lib/annotations/annotations.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,10 @@
// TODO(sjmiles): the distinction between an `annotation` and
// `annotation data` is not as clear as it could be
_parseNodeAttributeAnnotations: function(node, annotation) {
for (var i=node.attributes.length-1, a; (a=node.attributes[i]); i--) {
// Make copy of original attribute list, since the order may change
// as attributes are added and removed
var attrs = Array.prototype.slice.call(node.attributes);
for (var i=attrs.length-1, a; (a=attrs[i]); i--) {
var n = a.name;
var v = a.value;
var b;
Expand Down Expand Up @@ -304,7 +307,7 @@
// Initialize attribute bindings with any literal parts
var literal = this._literalFromParts(parts);
if (kind == 'attribute') {
node.setAttribute(name, literal);
node.setAttribute(name, literal);
}
// Clear attribute before removing, since IE won't allow removing
// `value` attribute if it previously had a value (can't
Expand Down
2 changes: 1 addition & 1 deletion src/lib/dom-module.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
function forceDocumentUpgrade() {
if (cePolyfill) {
var script = document._currentScript || document.currentScript;
var doc = script && script.ownerDocument;
var doc = script && script.ownerDocument || document;
if (doc) {
CustomElements.upgradeAll(doc);
}
Expand Down
5 changes: 3 additions & 2 deletions test/unit/dom-module-inline.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@
var module;

suite('dom-module inline', function() {
var temp = document.getElementById('temp');

test('dom-module will work when inlined', function() {
// simulate an inline dom-module
// use a new script object to make document.currentScript work correctly
var e = document.createElement('script');
e.textContent = 'temp.innerHTML = \'<dom-module id="foo"></dom-module>\'; module = Polymer.DomModule.import("foo");';
e.textContent =
'temp.innerHTML = \'<dom-module id="foo"></dom-module>\';' +
'module = Polymer.DomModule.import("foo");';
document.body.appendChild(e);
assert.ok(module, 'found module');
});
Expand Down

0 comments on commit 8080a30

Please sign in to comment.