B2G/gecko/browser/devtools/styleinspector/CssRuleView.jsm
/**
   * Validate this property.
   *
   * @param {String} [aValue]
   *        Override the actual property value used for validation without
   *        applying property values e.g. validate as you type.
   *
   * @returns {Boolean}
   *          True if the property value is valid, false otherwise.
   */
Validate this property.
@param {String} [aValue]
Override the actual property value used for validation without
applying property values e.g. validate as you type.

@returns {Boolean}
True if the property value is valid, false otherwise.
Validate this property . @param { String } [ aValue ] Override the actual property value used for validation without applying property values e . g . validate as you type . @returns { Boolean } True if the property value is valid false otherwise .
function TextPropertyEditor_validate(aValue)
  {
    let name = this.prop.name;
    let value = typeof aValue == "undefined" ? this.prop.value : aValue;
    let val = this._parseValue(value);
    let style = this.doc.createElementNS(HTML_NS, "div").style;
    let prefs = Services.prefs;
    let prefVal = Services.prefs.getBoolPref("layout.css.report_errors");
    prefs.setBoolPref("layout.css.report_errors", false);
    try {
      style.setProperty(name, val.value, val.priority);
    } finally {
      prefs.setBoolPref("layout.css.report_errors", prefVal);
    }
    return !!style.getPropertyValue(name);
  }
function TextPropertyEditor_validate ( aValue ) { let name = this . prop . name ; let value = typeof aValue == "undefined" ? this . prop . value : aValue ; let val = this . _parseValue ( value ) ; let style = this . doc . createElementNS ( HTML_NS , "div" ) . style ; let prefs = Services . prefs ; let prefVal = Services . prefs . getBoolPref ( "layout.css.report_errors" ) ; prefs . setBoolPref ( "layout.css.report_errors" , false ) ; try { style . setProperty ( name , val . value , val . priority ) ; } finally { prefs . setBoolPref ( "layout.css.report_errors" , prefVal ) ; } return ! ! style . getPropertyValue ( name ) ; }
Validate this property.
Validate this property .
// We toggle output of errors whilst the user is typing a property value.