[css3-conditional] define insertRule and deleteRule more precisely

Thu, 06 Dec 2012 18:31:02 -0800

author
L. David Baron <dbaron@dbaron.org>
date
Thu, 06 Dec 2012 18:31:02 -0800
changeset 7104
11b7f2371aa3
parent 7103
c1b03e554bb4
child 7105
4f6f1a7462fc

[css3-conditional] define insertRule and deleteRule more precisely

This should address feedback in
http://lists.w3.org/Archives/Public/www-style/2012Nov/0330.html

css3-conditional/Overview.html file | annotate | diff | comparison | revisions
css3-conditional/Overview.src.html file | annotate | diff | comparison | revisions
     1.1 --- a/css3-conditional/Overview.html	Fri Dec 07 11:13:35 2012 +0900
     1.2 +++ b/css3-conditional/Overview.html	Thu Dec 06 18:31:02 2012 -0800
     1.3 @@ -1111,15 +1111,28 @@
     1.4     <dt><code>insertRule(DOMString rule, unsigned long index)</code>, returns
     1.5      <code>unsigned long</code>
     1.6  
     1.7 -   <dd>The <code>insertRule</code> operation must insert a CSS rule
     1.8 -    <var>rule</var> into the CSS rule list returned by <code>cssRules</code>
     1.9 -    at <var>index</var>.
    1.10 +   <dd> The <code>insertRule</code> operation must insert a CSS rule
    1.11 +    <var>rule</var> into the CSS rule list returned by <code>cssRules</code>,
    1.12 +    such that the inserted rule will be at position <var>index</var>, and any
    1.13 +    rules previously at <var>index</var> or higher will increase their index
    1.14 +    by one. It must throw INDEX_SIZE_ERR if index is greater than
    1.15 +    <code>cssRules.length</code>. It must throw SYNTAX_ERR if the rule has a
    1.16 +    syntax error and is unparseable; this does not include syntax errors
    1.17 +    handled by error handling rules for constructs inside of the rule. It
    1.18 +    must throw HIERARCHY_REQUEST_ERR if the rule cannot be inserted at the
    1.19 +    location specified, for example, if an ‘<code
    1.20 +    class=css>@import</code>’ rule is inserted inside a group rule. <span
    1.21 +    class=issue>This needs to specify what to do if <code>rule</code> is the
    1.22 +    empty string, if it contains more than one CSS rule, or if it contains
    1.23 +    garbage after a valid rule.</span>
    1.24  
    1.25     <dt><code>deleteRule (unsigned long index)</code>, return
    1.26      <code>void</code>
    1.27  
    1.28 -   <dd>The <code>deleteRule</code> operation must remove a CSS rule from the
    1.29 -    CSS rule list returned by <code>cssRules</code> at <var>index</var>.
    1.30 +   <dd> The <code>deleteRule</code> operation must remove a CSS rule from the
    1.31 +    CSS rule list returned by <code>cssRules</code> at <var>index</var>. It
    1.32 +    must throw INDEX_SIZE_ERR if index is greater than or equal to
    1.33 +    <code>cssRules.length</code>.
    1.34    </dl>
    1.35  
    1.36    <h3 id=the-cssconditionrule-interface><span class=secno>7.3. </span> The <a
     2.1 --- a/css3-conditional/Overview.src.html	Fri Dec 07 11:13:35 2012 +0900
     2.2 +++ b/css3-conditional/Overview.src.html	Thu Dec 06 18:31:02 2012 -0800
     2.3 @@ -861,12 +861,35 @@
     2.4  <dl class='idl-methods'>
     2.5    <dt><code>insertRule(DOMString rule, unsigned long index)</code>, returns
     2.6      <code>unsigned long</code>
     2.7 -  <dd>The <code>insertRule</code> operation must insert a CSS rule <var>rule</var>
     2.8 -    into the CSS rule list returned by <code>cssRules</code> at <var>index</var>.
     2.9 +  <dd>
    2.10 +    The <code>insertRule</code> operation must
    2.11 +    insert a CSS rule <var>rule</var>
    2.12 +    into the CSS rule list returned by <code>cssRules</code>,
    2.13 +    such that the inserted rule will be at position <var>index</var>,
    2.14 +    and any rules previously at <var>index</var> or higher
    2.15 +    will increase their index by one.
    2.16 +    It must throw INDEX_SIZE_ERR
    2.17 +    if index is greater than <code>cssRules.length</code>.
    2.18 +    It must throw SYNTAX_ERR
    2.19 +    if the rule has a syntax error and is unparseable;
    2.20 +    this does not include syntax errors handled by error handling rules
    2.21 +    for constructs inside of the rule.
    2.22 +    It must throw HIERARCHY_REQUEST_ERR
    2.23 +    if the rule cannot be inserted at the location specified,
    2.24 +    for example, if an ''@import'' rule is inserted inside a group rule.
    2.25 +
    2.26 +    <span class="issue">This needs to specify what to do
    2.27 +    if <code>rule</code> is the empty string,
    2.28 +    if it contains more than one CSS rule,
    2.29 +    or if it contains garbage after a valid rule.</span>
    2.30  
    2.31    <dt><code>deleteRule (unsigned long index)</code>, return <code>void</code>
    2.32 -  <dd>The <code>deleteRule</code> operation must remove a CSS rule from the 
    2.33 -    CSS rule list returned by <code>cssRules</code> at <var>index</var>.
    2.34 +  <dd>
    2.35 +    The <code>deleteRule</code> operation must
    2.36 +    remove a CSS rule from
    2.37 +    the CSS rule list returned by <code>cssRules</code> at <var>index</var>.
    2.38 +    It must throw INDEX_SIZE_ERR
    2.39 +    if index is greater than or equal to <code>cssRules.length</code>.
    2.40  </dl>
    2.41  
    2.42  

mercurial