<?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>21650</bug_id>
          
          <creation_ts>2013-04-10 06:29:17 +0000</creation_ts>
          <short_desc>Require that XHR is available in workers</short_desc>
          <delta_ts>2014-02-07 16:18: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>XHR</component>
          <version>unspecified</version>
          <rep_platform>PC</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>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Pieters">zcorpan</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>hsteen</cc>
    
    <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>85843</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-04-10 06:29:17 +0000</bug_when>
    <thetext>http://xhr.spec.whatwg.org/#interface-xmlhttprequest

This used to be in the worker spec but was removed at some point. The XHR spec needs to say something like

[[
The XMLHttpRequest constructor must be exposed if the JavaScript global environment is a worker environment.
]]

see e.g. http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#workernavigator

Similarly for all other interfaces you want to be exposed in workers defined in this spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85847</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-04-10 06:38:38 +0000</bug_when>
    <thetext>Hmm, the WorkerNavigator example should probably be used for interfaces, while constructors should use

[[
This constructor must be visible when the script&apos;s global object is either a Window object or an object implementing the WorkerGlobalScope interface.
]]
see http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#shared-workers-and-the-sharedworker-interface</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85849</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-04-10 07:49:11 +0000</bug_when>
    <thetext>What does &quot;must be exposed&quot; mean? Is that defined somewhere?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85851</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-04-10 08:17:21 +0000</bug_when>
    <thetext>http://dev.w3.org/2006/webapi/WebIDL/#dfn-expose</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86646</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-04-24 00:11:10 +0000</bug_when>
    <thetext>Note that the HTML side of this is in flux (two checkins today; more possibly in the semi-near future).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96032</commentid>
    <comment_count>5</comment_count>
    <who name="Hallvord R. M. Steen">hsteen</who>
    <bug_when>2013-11-08 10:45:33 +0000</bug_when>
    <thetext>I don&apos;t quite get why the XHR spec should say that XHR must be available in Workers. Shouldn&apos;t rather the Worker spec reference XHR and say that it must be made available?

(There is currently no mention of XHR in http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html except that XMLHttpRequest is used in one of the demo scripts..)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96045</commentid>
    <comment_count>6</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-11-08 22:29:58 +0000</bug_when>
    <thetext>No, we do not want to update the workers specification whenever a new API comes out. Instead, we should embrace workers as a first-class citizen.

This&apos;ll be fixed soon once we have the [Global] and [ExposedBy] or whatever we call them annotations.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100020</commentid>
    <comment_count>7</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-02-07 16:18:10 +0000</bug_when>
    <thetext>https://github.com/whatwg/xhr/commit/4d307f0a00301fbd147ed78f37428694b14cde08</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>