| Index: tools/dom/templates/html/impl/impl_Element.darttemplate
|
| diff --git a/tools/dom/templates/html/impl/impl_Element.darttemplate b/tools/dom/templates/html/impl/impl_Element.darttemplate
|
| index 180a0b9d1d74456e31dd68b8e1f564cee61d412d..15c6f76a5b5348545f6abc893d9583513b1c07f0 100644
|
| --- a/tools/dom/templates/html/impl/impl_Element.darttemplate
|
| +++ b/tools/dom/templates/html/impl/impl_Element.darttemplate
|
| @@ -1453,6 +1453,24 @@ $if DART2JS
|
| return true;
|
| }
|
| }
|
| + var length = 0;
|
| + if (element.children) {
|
| + length = element.children.length;
|
| + }
|
| + for (var i = 0; i < length; i++) {
|
| + var child = element.children[i];
|
| + // On IE it seems like we sometimes don't see the clobbered attribute,
|
| + // perhaps as a result of an over-optimization. Also use another route
|
| + // to check of attributes, children, or lastChild are clobbered. It may
|
| + // seem silly to check children as we rely on children to do this iteration,
|
| + // but it seems possible that the access to children might see the real thing,
|
| + // allowing us to check for clobbering that may show up in other accesses.
|
| + if (child["id"] == 'attributes' || child["name"] == 'attributes' ||
|
| + child["id"] == 'lastChild' || child["name"] == 'lastChild' ||
|
| + child["id"] == 'children' || child["name"] == 'children') {
|
| + return true;
|
| + }
|
| + }
|
| return false;
|
| })(#)''', element);
|
| }
|
| @@ -1485,11 +1503,11 @@ $else
|
| }
|
| $endif
|
|
|
| - String get _safeTagName {
|
| + static String _safeTagName(element) {
|
| String result = 'element tag unavailable';
|
| try {
|
| - if (tagName is String) {
|
| - result = tagName;
|
| + if (element.tagName is String) {
|
| + result = element.tagName;
|
| }
|
| } catch (e) {}
|
| return result;
|
|
|