Skip to content

Commit ae09849

Browse files
committed
Replace innerHTML assignments with safer versions.
In these cases, it doesn't really matter; assigning constant strings is generally safe, but it's nice to avoid innerHTML assignments anyway, I guess. Submitted on behalf of a Googler.
1 parent 2abffbe commit ae09849

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

javascript/atoms/test/focus_test.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@
247247
});
248248
goog.events.listen(goog.dom.$('clearTestLog'), eventType.CLICK,
249249
function(e) {
250-
goog.dom.$('testLog').innerHTML = '';
250+
goog.dom.removeChildren(goog.dom.$('testLog'));
251251
});
252252
</script>
253253
</div>

javascript/atoms/test/shown_test.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,9 @@
341341
function testOverflowHiddenWithFixedPositionChild() {
342342
var target = findElement({id: 'overflowHiddenWithFixedPositionChild'});
343343
var child = findElement({id: 'fixedPositionChild'});
344-
child.innerHTML = '';
344+
goog.dom.removeChildren(child);
345345
assertFalse(isShown(target));
346-
child.innerHTML = 'some content';
346+
goog.dom.setTextContent(child, 'some content');
347347
assertTrue(isShown(target));
348348
}
349349

0 commit comments

Comments
 (0)