build: upgrade to TypeScript 2.8 (#23782)

PR Close #23782
This commit is contained in:
Lucas Sloan
2018-05-08 13:37:54 -07:00
committed by Alex Rickabaugh
parent e5e5c24d48
commit 5cf82f8f3f
15 changed files with 127 additions and 33 deletions

View File

@ -141,13 +141,13 @@ class SanitizingHtmlSerializer {
const elAttrs = element.attributes;
for (let i = 0; i < elAttrs.length; i++) {
const elAttr = elAttrs.item(i);
const attrName = elAttr.name;
const attrName = elAttr !.name;
const lower = attrName.toLowerCase();
if (!VALID_ATTRS.hasOwnProperty(lower)) {
this.sanitizedSomething = true;
continue;
}
let value = elAttr.value;
let value = elAttr !.value;
// TODO(martinprobst): Special case image URIs for data:image/...
if (URI_ATTRS[lower]) value = _sanitizeUrl(value);
if (SRCSET_ATTRS[lower]) value = sanitizeSrcset(value);

View File

@ -146,7 +146,7 @@ export class InertBodyHelper {
// loop backwards so that we can support removals.
for (let i = elAttrs.length - 1; 0 < i; i--) {
const attrib = elAttrs.item(i);
const attrName = attrib.name;
const attrName = attrib !.name;
if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {
el.removeAttribute(attrName);
}