public static final class ConformanceRules.BanCreateElement extends ConformanceRules.AbstractRule
document.createElement
and similar methods with string literal parameter specified
in value
, e.g. value: 'script'
. The purpose of banning these is that they don't
provide the type information which hinders other rules. Authors should use e.g. goog.dom.createElement(goog.dom.TagName.SCRIPT)
which returns HTMLScriptElement.Constructor and Description |
---|
BanCreateElement(AbstractCompiler compiler,
Requirement requirement) |
Modifier and Type | Method and Description |
---|---|
protected ConformanceRules.ConformanceResult |
checkConformance(NodeTraversal t,
Node n) |
check, isWhitelistedByRequirement, report
public BanCreateElement(AbstractCompiler compiler, Requirement requirement) throws CheckConformance.InvalidRequirementSpec
protected ConformanceRules.ConformanceResult checkConformance(NodeTraversal t, Node n)
checkConformance
in class ConformanceRules.AbstractRule
Copyright © 2009-2018 Google. All Rights Reserved.