diff --git a/src/lib/dom-module.html b/src/lib/dom-module.html
index 8dfb5785e3..7fae6b64c4 100644
--- a/src/lib/dom-module.html
+++ b/src/lib/dom-module.html
@@ -3,6 +3,7 @@
(function() {
var modules = {};
+ var lcModules = {};
/**
* The `dom-module` element registers the dom it contains to the name given
@@ -46,6 +47,7 @@
if (id) {
this.id = id;
modules[id] = this;
+ lcModules[id.toLowerCase()] = this;
}
},
@@ -59,7 +61,7 @@
* at the specified `id`.
*/
import: function(id, selector) {
- var m = modules[id];
+ var m = modules[id] || lcModules[id.toLowerCase()];
if (!m) {
// If polyfilling, a script can run before a dom-module element
// is upgraded. We force the containing document to upgrade
diff --git a/src/micro/tag.html b/src/micro/tag.html
index 885a24d753..32f744bb7b 100644
--- a/src/micro/tag.html
+++ b/src/micro/tag.html
@@ -21,6 +21,9 @@
this.is = id;
}
}
+ if (this.is) {
+ this.is = this.is.toLowerCase();
+ }
}
});
diff --git a/test/runner.html b/test/runner.html
index b4c84dc280..f8f32642b6 100644
--- a/test/runner.html
+++ b/test/runner.html
@@ -20,6 +20,7 @@
'unit/micro.html',
'unit/unresolved.html',
'unit/attributes.html',
+ 'unit/dom-module.html',
'unit/async.html',
'unit/behaviors.html',
'unit/template.html',
diff --git a/test/unit/dom-module-elements.html b/test/unit/dom-module-elements.html
new file mode 100644
index 0000000000..cd552e70e3
--- /dev/null
+++ b/test/unit/dom-module-elements.html
@@ -0,0 +1,7 @@
+import
+
+
element
+
+case
+
+Case
\ No newline at end of file
diff --git a/test/unit/dom-module.html b/test/unit/dom-module.html
new file mode 100644
index 0000000000..19f9f5f1b7
--- /dev/null
+++ b/test/unit/dom-module.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
foo
+
+
+
+
+
+
diff --git a/test/unit/micro-elements.html b/test/unit/micro-elements.html
index 2db74b38e2..86c902479d 100644
--- a/test/unit/micro-elements.html
+++ b/test/unit/micro-elements.html
@@ -75,4 +75,23 @@
document.registerElement('x-extension', XInput);
-
\ No newline at end of file
+
+
+
+
+
+
+
diff --git a/test/unit/micro.html b/test/unit/micro.html
index 53989aaaf1..dbba916d6a 100644
--- a/test/unit/micro.html
+++ b/test/unit/micro.html
@@ -117,6 +117,14 @@
assert.equal(lookup.import('my-module', 'div'), c);
});
+ test('mixed-case is (element type) forced to lowercase', function() {
+ var a = document.createElement('x-mixed-case');
+ assert.equal(a.is, 'x-mixed-case');
+ var b = document.createElement('button', 'x-mixed-case-button');
+ assert.equal(b.is, 'x-mixed-case-button');
+ assert.equal(b.getAttribute('is'), 'x-mixed-case-button');
+ });
+
});
diff --git a/test/unit/styling-scoped-elements.html b/test/unit/styling-scoped-elements.html
index 302b8f6ef6..9cfa3d1688 100644
--- a/test/unit/styling-scoped-elements.html
+++ b/test/unit/styling-scoped-elements.html
@@ -207,6 +207,42 @@
});
+
+
+
+ Mixed-Case
+
+
+
+
+
+
+
+ Mixed-Case
+
+
+
+
+
Added
diff --git a/test/unit/styling-scoped.html b/test/unit/styling-scoped.html
index b1efeb714c..ac7a52387e 100644
--- a/test/unit/styling-scoped.html
+++ b/test/unit/styling-scoped.html
@@ -199,7 +199,8 @@
test('styles shimmed in registration order', function() {
var s$ = document.head.querySelectorAll('style[scope]');
- var expected = ['x-gchild', 'x-child2', 'x-styled', 'x-button', 'x-dynamic-scope'];
+ var expected = ['x-gchild', 'x-child2', 'x-styled', 'x-button',
+ 'x-mixed-case', 'x-mixed-case-button', 'x-dynamic-scope'];
var actual = [];
for (var i=0; i