<?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>26836</bug_id>
          
          <creation_ts>2014-09-17 16:10:36 +0000</creation_ts>
          <short_desc>Extend script settings objects to be environment settings objects for use by fetch et al</short_desc>
          <delta_ts>2014-10-10 23:43:24 +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>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          <blocked>24080</blocked>
    
    <blocked>26603</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Ian &apos;Hixie&apos; Hickson">ian</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>adrianba</cc>
    
    <cc>annevk</cc>
    
    <cc>ap</cc>
    
    <cc>bzbarsky</cc>
    
    <cc>eoconnor</cc>
    
    <cc>hober0</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>w3c</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>111695</commentid>
    <comment_count>0</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-09-17 16:10:36 +0000</bug_when>
    <thetext></thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112412</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-09-29 20:27:52 +0000</bug_when>
    <thetext>Just a quick heads-up: to help the Fetch spec, I&apos;m going to be extending the existing Script Setting Object concept to be usable even when scripts are not running. This won&apos;t affect the Stack of Settings Objects, but it will mean that Settings Objects might be passed around when no script is running. I plan to rename the concept to Environment Settings Objects accordingly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112416</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-09-29 20:46:24 +0000</bug_when>
    <thetext>Currently, a bunch of specifications have checks along the lines of &quot;if the JavaScript global environment is a document environment, ...&quot;

It would be good if these kind of checks could be rewritten using this new construct, if we don&apos;t want to tie the platform to JavaScript at a conceptual level. (No strong feelings about that either way personally.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112432</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-09-29 23:43:01 +0000</bug_when>
    <thetext>Those can be trivially patched to just check the &quot;specified global object&quot; of the settings object, or some such, but we could also add an explicit &quot;environment kind&quot; which has a 1:1 mapping to that and makes it clearer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112976</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-10-10 23:43:24 +0000</bug_when>
    <thetext>I ended up not adding the environment kind because I couldn&apos;t come up with terms that didn&apos;t suck or clash with something already. So just refer to the specified global object (or, the global object specified by the environment settings object, or whatever) when testing its type.

Anyway, we now have environment settings objects. You can get them from the global and pass them around, and you&apos;ll have everything you need including a reference to the event loop which you likely need for various reasons. I recommend using this widely instead of the &quot;client&quot; concept, &quot;realm&quot; concept, or the global itself, since we can more trivially hang things from it if necessary.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>