refactor(compiler): use Object.keys instead of Object.getOwnPropertyNames (#10498)

This commit is contained in:
Marc Laval
2016-08-04 19:35:41 +02:00
committed by Alex Rickabaugh
parent fd19671c07
commit cd18de7a21
11 changed files with 19 additions and 23 deletions

View File

@ -55,7 +55,7 @@ export function extractSchema(): Map<string, string[]> {
extractProperties(
SVGTextPositioningElement, svgText, visited, descMap, SVG_PREFIX + 'textPositioning',
SVG_PREFIX + 'textContent');
var keys = Object.getOwnPropertyNames(window).filter(
var keys = Object.keys(window).filter(
k => k.endsWith('Element') && (k.startsWith('HTML') || k.startsWith('SVG')));
keys.sort();
keys.forEach(
@ -97,7 +97,7 @@ function extractProperties(
const fullName = name + (superName ? '^' + superName : '');
let props: string[] = descMap.has(fullName) ? descMap.get(fullName) : [];
var prototype = type.prototype;
var keys = Object.getOwnPropertyNames(prototype);
var keys = Object.keys(prototype);
keys.sort();
keys.forEach((n) => {
if (n.startsWith('on')) {