Package com.google.javascript.jscomp
Class ConformanceRules.BanCreateDom
- java.lang.Object
-
- com.google.javascript.jscomp.ConformanceRules.AbstractRule
-
- com.google.javascript.jscomp.ConformanceRules.BanCreateDom
-
- All Implemented Interfaces:
CheckConformance.Rule
- Enclosing class:
- ConformanceRules
public static final class ConformanceRules.BanCreateDom extends ConformanceRules.AbstractRule
Bangoog.dom.createDom
andgoog.dom.DomHelper#createDom
with parameters specified invalue
in the format tagname.attribute, e.g.value: 'iframe.src'
. Tag name might be also*
to ban the attribute in any tag. Note that string literal values assigned to banned attributes are allowed as they couldn't be attacker controlled.
-
-
Constructor Summary
Constructors Constructor Description BanCreateDom(AbstractCompiler compiler, com.google.javascript.jscomp.Requirement requirement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ConformanceRules.ConformanceResult
checkConformance(NodeTraversal t, Node n)
-
Methods inherited from class com.google.javascript.jscomp.ConformanceRules.AbstractRule
check, report, tsIsAllowlisted
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.google.javascript.jscomp.CheckConformance.Rule
getPrecondition
-
-
-
-
Constructor Detail
-
BanCreateDom
public BanCreateDom(AbstractCompiler compiler, com.google.javascript.jscomp.Requirement requirement) throws CheckConformance.InvalidRequirementSpec
-
-
Method Detail
-
checkConformance
protected ConformanceRules.ConformanceResult checkConformance(NodeTraversal t, Node n)
- Specified by:
checkConformance
in classConformanceRules.AbstractRule
- Returns:
- Whether the code represented by the Node conforms to the rule.
-
-