src/basis/cssom.js
function compatibleStyleSheetInsertRule(rule, index){
    // fetch selector and style from rule description
    var m = rule.match(/^([^{]+)\{(.*)\}\s*$/);
    if (m)
    {
      var selectors = m[1].trim().split(/\s*,\s*/);
      for (var i = 0; i < selectors.length; i++)
        this.addRule(selectors[i], m[2] || null, index++);
      return index - 1;
    }

    /** @cut */ throw new Error('Syntax error in CSS rule to be added');
  }
function compatibleStyleSheetInsertRule(rule, index){
    // fetch selector and style from rule description
    var m = rule.match(/^([^{]+)\{(.*)\}\s*$/);
    if (m)
    {
      var selectors = m[1].trim().split(/\s*,\s*/);
      for (var i = 0; i < selectors.length; i++)
        this.addRule(selectors[i], m[2] || null, index++);
      return index - 1;
    }

    /** @cut */ throw new Error('Syntax error in CSS rule to be added');
  }
function compatibleStyleSheetInsertRule ( rule , index ) { // fetch selector and style from rule description var m = rule . match ( / ^([^{]+)\{(.*)\}\s*$ / ) ; if ( m ) { var selectors = m [ 1 ] . trim ( ) . split ( / \s*,\s* / ) ; for ( var i = 0 ; i < selectors . length ; i ++ ) this . addRule ( selectors [ i ] , m [ 2 ] || null , index ++ ) ; return index - 1 ; } /** @cut */ throw new Error ( 'Syntax error in CSS rule to be added' ) ; }
working with stylesheets
working with stylesheets