diff --git a/packages/core/src/debug/debug_node.ts b/packages/core/src/debug/debug_node.ts index ca78b012ed..86e3d66b18 100644 --- a/packages/core/src/debug/debug_node.ts +++ b/packages/core/src/debug/debug_node.ts @@ -329,10 +329,14 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ implements DebugEleme const eAttrs = element.attributes; for (let i = 0; i < eAttrs.length; i++) { const attr = eAttrs[i]; + const lowercaseName = attr.name.toLowerCase(); + // Make sure that we don't assign the same attribute both in its // case-sensitive form and the lower-cased one from the browser. - if (lowercaseTNodeAttrs.indexOf(attr.name) === -1) { - attributes[attr.name] = attr.value; + if (lowercaseTNodeAttrs.indexOf(lowercaseName) === -1) { + // Save the lowercase name to align the behavior between browsers. + // IE preserves the case, while all other browser convert it to lower case. + attributes[lowercaseName] = attr.value; } }