GoogleChrome / accessibility-developer-tools

This is a library of accessibility-related testing and utility code.
Apache License 2.0
2.28k stars 363 forks source link

Is `AuditConfiguration.prototype.setRuleConfig()` for user defined rules? #281

Open sarbbottam opened 8 years ago

sarbbottam commented 8 years ago

Is AuditConfiguration.prototype.setRuleConfig() for user defined rules?

/**
 * Sets the user-specified configuration for the given audit rule. This will
 * vary in structure from rule to rule; see individual rules for
 * configuration options.
 * @param {string} auditRuleName
 * @param {Object} config
 */
setRuleConfig: function(auditRuleName, config) {
    if (!(auditRuleName in this.rules_))
        this.rules_[auditRuleName] = {};
    this.rules_[auditRuleName].config = config;
},

Looks like I can pass any string for auditRuleName. Is that correct?

What does config look like? structure / schema of config?

// This will vary in structure from rule to rule; see individual rules for configuration options.

I am sorry I don't follow this, could you please educate me on this?

Thanks!