<?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>13720</bug_id>
          
          <creation_ts>2011-08-10 02:56:04 +0000</creation_ts>
          <short_desc>Define javascript: processing entirely inline, and make it only happen in the navigation algorithm; then, remove special-casing elsewhere, and make it non-conforming in those places</short_desc>
          <delta_ts>2013-11-21 12:59:17 +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>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#javascript-protocol</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          <blocked>12986</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael[tm] Smith">mike</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</cc>
    
    <cc>bzbarsky</cc>
    
    <cc>eoconnor</cc>
    
    <cc>evnikita2</cc>
    
    <cc>ian</cc>
    
    <cc>julian.reschke</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>robin</cc>
    
    <cc>shadow2531</cc>
    
    <cc>w3cbugzilla</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>54553</commentid>
    <comment_count>0</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-08-10 02:56:04 +0000</bug_when>
    <thetext>&gt; Probably the same is with &apos;javascript&apos; URIs (Section 6.1.5).  It 
&gt; references [JSURL], the draft-hoehrmann-javascript-scheme, which is 
&gt; now expired.  It includes-by-reference the source code retrieval 
&gt; operation for these URIs 
&gt; (http://tools.ietf.org/html/draft-hoehrmann-javascript-scheme-03#section-3.1).  
&gt; I propose not to include it by reference but rather describe in the 
&gt; specification itself.  The algorithm contains only 4 steps so it 
&gt; shouldn&apos;t be a problem.

[split out from bug 12986]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54958</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2011-08-14 09:44:24 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document: &lt;http://dev.w3.org/html5/decision-policy/decision-policy.html&gt;.

Status: Rejected
Change Description: no spec change
Rationale: Do you mean the HTML specification ought to define the javascript URL scheme fully?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54967</commentid>
    <comment_count>2</comment_count>
    <who name="Mykyta Yevstifeyev">evnikita2</who>
    <bug_when>2011-08-14 10:09:34 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are
&gt; satisfied with this response, please change the state of this bug to CLOSED. If
&gt; you have additional information and would like the editor to reconsider, please
&gt; reopen this bug. If you would like to escalate the issue to the full HTML
&gt; Working Group, please add the TrackerRequest keyword to this bug, and suggest
&gt; title and text for the tracker issue; or you may create a tracker issue
&gt; yourself, if you are able to do so. For more details, see this document:
&gt; &lt;http://dev.w3.org/html5/decision-policy/decision-policy.html&gt;.
&gt; 
&gt; Status: Rejected
&gt; Change Description: no spec change
&gt; Rationale: Do you mean the HTML specification ought to define the javascript
&gt; URL scheme fully?

Marked as REOPENED now. I need some time to contact Bjoern Hoehrmann, the author of this draft, to ask whether he&apos;s going to continue work on it; then I&apos;ll be able to answer. Please keep this bug open until there is any response from him.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55013</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-08-15 03:51:37 +0000</bug_when>
    <thetext>Please re-assign the bug to me when there is something actionable for me. :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55068</commentid>
    <comment_count>4</comment_count>
    <who name="Mykyta Yevstifeyev">evnikita2</who>
    <bug_when>2011-08-15 10:22:33 +0000</bug_when>
    <thetext>I did finally receive the response from Bjoern. He claims he&apos;ll continue work on the draft; and I personally think this work will be performed by the time HTML5 will have reached W3C Recommendation level.

I&apos;ll close the ticket as &quot;LATER&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82021</commentid>
    <comment_count>5</comment_count>
    <who name="">public-rdfa-wg</who>
    <bug_when>2013-01-24 06:30:57 +0000</bug_when>
    <thetext>This bug was cloned to create HTML WG bug 19062.

http://www.w3.org/mid/4DFC5AC4.7030105@gmail.com</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84640</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-03-19 17:38:48 +0000</bug_when>
    <thetext>Mykyta: Any news on this draft being updated?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84642</commentid>
    <comment_count>7</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-03-19 17:42:57 +0000</bug_when>
    <thetext>FWIW, I think we could define it inline using http://wiki.whatwg.org/wiki/URL_schemes#javascript:_URLs That might not be so bad given that we&apos;re only using it in the navigate algorithm.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85898</commentid>
    <comment_count>8</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-04-10 21:54:17 +0000</bug_when>
    <thetext>*** Bug 20990 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85899</commentid>
    <comment_count>9</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-04-10 21:56:12 +0000</bug_when>
    <thetext>Ok. I think we&apos;ll just define it inline. Since we&apos;re moving towards doing it only during HTML navigation, there&apos;s not much point having a reusable spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95222</commentid>
    <comment_count>10</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-10-23 19:17:04 +0000</bug_when>
    <thetext>Ok so the plan here is to remove all occurrences of &quot;javascript:&quot; in the spec, and move all the normative content to the Navigate algorithm, to a branch in the step that says &quot;If the new resource is to be fetched using HTTP GET or equivalent...&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95353</commentid>
    <comment_count>11</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-10-25 18:05:08 +0000</bug_when>
    <thetext>Said branch should avoid &quot;fetch&quot; entirely, and run JS directly. This fixes one bug which is that right now we try to execute javascript: async without a task, oops.

We&apos;ll also have to change &quot;Wait for one or more bytes to be available or for the user agent to establish that the resource in question is empty&quot; in navigate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95356</commentid>
    <comment_count>12</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-10-25 18:24:44 +0000</bug_when>
    <thetext>We do need this case to run the JS async, though:

   frame = document.createElement(&apos;iframe&apos;);
   frame.src = &apos;javascript:alert(2);&apos;; // alerts second
   document.body.appendChild(frame);
   alert(1); // alerts first

Maybe queue a task to run the script, and have the &quot;Wait for one or more bytes&quot; step be ready to wait for bytes from either fetch or this JS deref task.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96346</commentid>
    <comment_count>13</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-11-14 22:25:30 +0000</bug_when>
    <thetext>Fetch needs to react to javascript: by treating it as an invalid protocol.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96347</commentid>
    <comment_count>14</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-11-14 22:34:20 +0000</bug_when>
    <thetext>Have to remember to set the override URL, still.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96358</commentid>
    <comment_count>15</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-11-15 15:56:29 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r8284.
Check-in comment: Move javascript: processing entirely into HTML, and fix its definitions to match reality better at the same time.
http://html5.org/tools/web-apps-tracker?from=8283&amp;to=8284</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96360</commentid>
    <comment_count>16</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2013-11-15 16:12:57 +0000</bug_when>
    <thetext>I&apos;m having trouble following the changes, so I have some questions:

1)  Does javascript: evaluation still affect session history after this change if
    it creates a new document?
2)  Does javascript: still run async after this change in all cases?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96362</commentid>
    <comment_count>17</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-11-15 16:18:40 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r8285.
Check-in comment: Define the task settings for the javascript: task
http://html5.org/tools/web-apps-tracker?from=8284&amp;to=8285</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96382</commentid>
    <comment_count>18</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-11-15 20:27:56 +0000</bug_when>
    <thetext>&gt; 1)  Does javascript: evaluation still affect session history after this
&gt;     change if it creates a new document?

Yeah. All that&apos;s really replaced is that instead of calling &quot;fetch&quot; we evaluate a script and use its result as the resource&apos;s data, and there&apos;s a hack to fix the URL to the previous URL.


&gt; 2)  Does javascript: still run async after this change in all cases?

It runs in a separate task, if that&apos;s what you mean. (The previous state of the spec with respect to this question was nonsensical. It ran the script literally asynchronously, potentially in parallel with scripts running as part of tasks run in the event loop!)


Please reopen the bug if there&apos;s anything else I should look at; I likely won&apos;t see changes to this bug for months if it&apos;s closed (I only look at bugmail every few weeks).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96383</commentid>
    <comment_count>19</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2013-11-15 20:30:09 +0000</bug_when>
    <thetext>No, that sounds fine.  Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96387</commentid>
    <comment_count>20</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-11-15 20:56:50 +0000</bug_when>
    <thetext>FWIW, the spec (if I&apos;m not missing something) matches the expectation of the test cases here:

   http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/

Note that Firefox doesn&apos;t quite match these; in particular, the spec, the tests, and Chrome/Safari never give a page a URL starting with the &quot;javascript:&quot; scheme. IE matches the tests except for 005, where it somehow gets the outer page URL instead of &quot;about:blank&quot; (not sure what&apos;s going on there).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96391</commentid>
    <comment_count>21</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2013-11-15 21:31:18 +0000</bug_when>
    <thetext>Right, the url of javascript:-generated pages is something we need to sort through still; it&apos;s only tangentially related to the processing model.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96637</commentid>
    <comment_count>22</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-11-21 12:59:17 +0000</bug_when>
    <thetext>*** Bug 19492 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>