<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>24096</bug_id>
          
          <creation_ts>2013-12-14 08:53:55 +0000</creation_ts>
          <short_desc>Clarify element.dataset delete algorithm</short_desc>
          <delta_ts>2014-01-03 22:37:50 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>sof</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>97617</commentid>
    <comment_count>0</comment_count>
    <who name="">sof</who>
    <bug_when>2013-12-14 08:53:55 +0000</bug_when>
    <thetext>Assuming element.setAttribute(&quot;data--n&quot;, &quot;o&quot;) has been performed on an element, element.dataset will report [ (&quot;N&quot;, &quot;o&quot;) ] in its key-value list result.

Per &quot;The algorithm for deleting names&quot;,

 http://www.whatwg.org/specs/web-apps/current-work/#embedding-custom-non-visible-data-with-the-data-*-attributes

&apos;delete element.dataset[&quot;N&quot;]&apos;  will remove the &quot;data--n&quot; property.

But so will &apos;delete element.dataset[&quot;-n&quot;]&apos;.

It seems slightly odd to admit this second form also. Trident (IE11) implements this, others don&apos;t, ignoring the deletion.

Should the delete steps have an extra step that corresponds to step 3 from the &quot;setting&quot; algorithm (but is non-throwing)? Or stay as-is as the current behaviour is intentional?

If the latter, perhaps a note can be added to clarify that &quot;deletion&quot; does allow untranslated minus-lowercase pairs to pass through verbatim?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97710</commentid>
    <comment_count>1</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-12-16 23:01:27 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r8359.
Check-in comment: Clarify that the delete dataset[foo] algorithm doesn&apos;t get invoked for values of &apos;foo&apos; that don&apos;t exist.
http://html5.org/tools/web-apps-tracker?from=8358&amp;to=8359</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97711</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-12-16 23:02:13 +0000</bug_when>
    <thetext>If I&apos;m not mistaken, what&apos;s going on here is that IE11 has a WebIDL bug, and that the deleter algorithm in HTML won&apos;t get invoked unless the property name exists.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97728</commentid>
    <comment_count>3</comment_count>
    <who name="">sof</who>
    <bug_when>2013-12-17 07:16:45 +0000</bug_when>
    <thetext>That looks accurate, the &quot;named property visibility algorithm&quot; (a predicate) needs to pass before the deleter is applied.

Thanks for the clarification, could the note be made a bit a stronger? (&quot;can get&quot; =&gt; &quot;will only be&quot;.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97985</commentid>
    <comment_count>4</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-01-03 22:37:50 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r8371.
Check-in comment: Clarification regarding &apos;The algorithm for deleting names&apos; for dataset.
http://html5.org/tools/web-apps-tracker?from=8370&amp;to=8371</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>