<?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>24150</bug_id>
          
          <creation_ts>2013-12-21 05:50:52 +0000</creation_ts>
          <short_desc>&quot;createAttribute&quot; &quot;setAttributeNode&quot; have no complete alternative</short_desc>
          <delta_ts>2013-12-22 22:38:10 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>DOM</component>
          <version>unspecified</version>
          <rep_platform>Macintosh</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>punosun</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>bzbarsky</cc>
    
    <cc>mike</cc>
    
    <cc>Ms2ger</cc>
    
    <cc>www-dom</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>97833</commentid>
    <comment_count>0</comment_count>
    <who name="">punosun</who>
    <bug_when>2013-12-21 05:50:52 +0000</bug_when>
    <thetext>http://dom.spec.whatwg.org/#dom-document-createattribute

[[
createAttribute
]]

http://dom.spec.whatwg.org/#dom-element-setattributenode

[[
setAttributeNode
]]

There is no alternate method provided for setting an attribute with no value.  For example, the only way to set the checked, selected or disabled attribute with no value is with element.setAttributeNode( document.createAttribute( &apos;selected&apos; ) );

The behavior is subtly different then setting the element property as element.selected = true; because the attribute persists when a form is reset.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97834</commentid>
    <comment_count>1</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2013-12-21 06:06:53 +0000</bug_when>
    <thetext>What&apos;s wrong with setAttribute(&quot;selected&quot;, &quot;&quot;)?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97836</commentid>
    <comment_count>2</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2013-12-21 07:57:15 +0000</bug_when>
    <thetext>Nothing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97845</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-12-22 22:38:10 +0000</bug_when>
    <thetext>The property for selected=&quot;&quot; is defaultSelected, not selected.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>