<?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>13675</bug_id>
          
          <creation_ts>2011-08-04 18:27:33 +0000</creation_ts>
          <short_desc>MessageEvent::ports should be a nullable platform array object for interop</short_desc>
          <delta_ts>2011-08-05 15:24:16 +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>Web Messaging (editor: Ian Hickson)</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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="Travis Leithead [MSFT]">travil</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>54183</commentid>
    <comment_count>0</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2011-08-04 18:27:33 +0000</bug_when>
    <thetext>The ports property of MessageEvent is currently defined as:

readonly attribute MessagePort[] ports;

however, IE10, Chrome, and Safari all return null when no ports were provided. (Opera returns an empty array as per the spec.) Not sure what Firefox is returning...

For better interop, consider changing the type of the ports property to a nullable platform array object:

readonly attribute MessagePort[]? ports; 
(with accompaning changes in the algorithms)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54240</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-08-05 15:24:16 +0000</bug_when>
    <thetext>It would be much better to return an empty array. Returning null or an array is a great way to have programming errors.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>