Class ConformanceRules.BanSettingAttributes

  • All Implemented Interfaces:
    CheckConformance.Rule
    Enclosing class:
    ConformanceRules

    public static final class ConformanceRules.BanSettingAttributes
    extends ConformanceRules.AbstractRule
    Can be used to ban any function like Element#setAttribute which takes two parameters, an attribute name and a value.

    The specific attribute names that are banned are specified in BANNED_ATTRS below.

    • Field Detail

      • BANNED_ATTRS

        public static final com.google.common.collect.ImmutableSet<java.lang.String> BANNED_ATTRS
        Security-sensitive attributes that are banned from being set.

        Making updates to these attributes requires a new JSCompiler release. You must test the change using a global presubmit "at head" and update any affected allowlists. See go/jscompiler-global-presubmit and go/tsjs-conformance-team-docs.