<?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>26101</bug_id>
          
          <creation_ts>2014-06-16 05:29:10 +0000</creation_ts>
          <short_desc>say what to do with event initializer dictionaries that have members without a default value</short_desc>
          <delta_ts>2014-10-14 11:58:42 +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>All</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>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Cameron McCormack">cam</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>bugs</cc>
    
    <cc>bzbarsky</cc>
    
    <cc>mike</cc>
    
    <cc>travil</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>107833</commentid>
    <comment_count>0</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2014-06-16 05:29:10 +0000</bug_when>
    <thetext>If we have this:

  dictionary SomeEventInit : EventInit {
    sequence&lt;DOMString&gt; values;
  };

  [Constructor(optional SomeEventInit eventInitDict)]
  interface SomeEvent : Event {
    [Cached] readonly attribute sequence&lt;DOMString&gt; values;
  };

assuming that [Cached] is a thing, then http://dom.spec.whatwg.org/#concept-event-constructor doesn&apos;t handle what to do when the values dictionary member is not present, for example if you do:

  new SomeEvent({});

Maybe the http://dom.spec.whatwg.org/#concept-event-constructor algorithm allow prose in other specs to describe how the Event object members get their values in this case?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107834</commentid>
    <comment_count>1</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-06-16 05:43:34 +0000</bug_when>
    <thetext>For this specific case (sequences), I think we should allow a default value.  See also bug 25391.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107836</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-06-16 06:09:17 +0000</bug_when>
    <thetext>Travis might need such a hook to define keyboard events.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107837</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-06-16 06:46:07 +0000</bug_when>
    <thetext>Suggestions welcome on how to define this by the way. &quot;default value for attribute /x/&quot; or some such?

(Should we also update the specification to more clearly indicate the internal properties of an event are being set (as the exposed are readonly)? Not sure how to do that though.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107840</commentid>
    <comment_count>4</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2014-06-16 09:22:33 +0000</bug_when>
    <thetext>So why isn&apos;t bug 25391, = [] , enough?
(Or change the SomeEvent to use sequence&lt;DOMString&gt;? and default to null)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113097</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-10-14 11:58:42 +0000</bug_when>
    <thetext>It seems this is taken care of now through changes in IDL.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>