Package com.google.javascript.jscomp
Class ConformanceRules.BanExecCommand
java.lang.Object
com.google.javascript.jscomp.ConformanceRules.AbstractRule
com.google.javascript.jscomp.ConformanceRules.BanExecCommand
- All Implemented Interfaces:
CheckConformance.Rule
- Enclosing class:
ConformanceRules
Ban
Document#execCommand with command names specified in value or any dynamic
string.-
Constructor Summary
ConstructorsConstructorDescriptionBanExecCommand(AbstractCompiler compiler, com.google.javascript.jscomp.Requirement requirement) Creates a custom checker to banDocument#execCommandbased on a conformance requirement spec. -
Method Summary
Modifier and TypeMethodDescriptionprotected ConformanceRules.ConformanceResultcheckConformance(NodeTraversal traversal, Node node) Methods inherited from class com.google.javascript.jscomp.ConformanceRules.AbstractRule
check, report, tsIsAllowlistedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.javascript.jscomp.CheckConformance.Rule
getPrecondition
-
Constructor Details
-
BanExecCommand
public BanExecCommand(AbstractCompiler compiler, com.google.javascript.jscomp.Requirement requirement) throws CheckConformance.InvalidRequirementSpec Creates a custom checker to banDocument#execCommandbased on a conformance requirement spec. Names invaluefields indicate the attribute names that should be blocked.- Throws:
CheckConformance.InvalidRequirementSpec- if the requirement is malformed
-
-
Method Details
-
checkConformance
- Specified by:
checkConformancein classConformanceRules.AbstractRule- Returns:
- Whether the code represented by the Node conforms to the rule.
-