Renie Siqueira | 17 Apr 20:18 2015

Future implementations and roadmap

Is there any idea about when/if Webkit will implement Service Workers?

Is there any url where people can check when you plan to implement an specific feature?

att,
--
span.nome{font-family:Arial,Helvetica,sans-serif; font-weight:bold; font-size:10pt;} span.tahoma{font-family:Tahoma,sans-serif;font-size:10pt;}

Renie Siqueira
Technology Analyst
Tel.: +55 (47) 2101-9913
SoftExpert Software
www.softexpert.com

<div>
    Is there any idea about when/if Webkit will implement Service
    Workers?<br><br>
    Is there any url where people can check when you plan to implement
    an specific feature?<br><br>
    att,<br><div class="moz-signature">-- <br>
	span.nome{font-family:Arial,Helvetica,sans-serif; font-weight:bold; font-size:10pt;}
	span.tahoma{font-family:Tahoma,sans-serif;font-size:10pt;}
<br><br><span class="nome">Renie Siqueira</span>
      <br><span class="tahoma">Technology Analyst</span>
      <br><span class="tahoma">Tel.: +55 (47) 2101-9913 </span>
      <br><span class="tahoma">SoftExpert Software
        <br><span class="tahoma"><a href="http://www.softexpert.com">www.softexpert.com</a></span>
        <br><span class="tahoma"><br><a href="http://www.softexpert.com/ext/assinatura-email/mailLink.php?id=2"></a></span>
      </span>
</div>
  </div>
Alex Xandra Albert Sim | 14 Apr 10:44 2015
Picon

Regarding Writing about WebKit's Architecture for Research Paper

Hello,

I am a newbie researcher interested in writing a research paper about 
browser engine's architecture. There's already papers written about 
this, for example:

http://grosskurth.ca/papers/browser-refarch.pdf
http://grosskurth.ca/papers/browser-archevol-20060619.pdf

but it's for older browsers. I am planning on writing papers for a more 
modern architecture like the current (and next) Webkit, Servo, etc. As I 
understand by searching from this and other mailing list, Webkit have no 
documented architecture other than the code (CMIIW).

My question is, is it ok if I write one paper regarding this, 
documenting WebKit's architecture in the process? And if it is OK, 
should I ask question about the architecture here or on webkit-dev when 
I have question?

Thank you very much.

--

-- 

Salam,

Alex Xandra Albert Sim
Sekretaris Jurusan
Teknik Informatika
STMIK Mikroskil

James Sandridge | 3 Apr 23:00 2015

Offlineasm backend selection / LLIntOffsetsExtractor.exe questions

Hello list,


We're having a curious thing happen in our port where offsets.rb selects a different backend than expected: X86  instead of X86_WIN.  


Background:


We're building on Windows with MSVC 2013, comparison to trunk are comparisons to WinCairo (our base).


We maintain our own variant of the offlineasm (build-LLDesiredOffsets.pl, build-LLIntAssembly, etc.) pipeline that avoids the makefiles and Perl but imitates their calls to the Ruby scripts underlying the overall process.


We also have our own process for generating LLIntOffsetsExtractor.exe, which I think is where our problem lies...


Our process still generates an MSVC solution that builds LLIntOffsetsExtractor.cpp and feeds into asm.rb, but ultimately results in X86 being selected as the active target instead of X86_WIN.


Obviously the problem is on our end and comes from some deviation from the existing process in trunk, but it's not obvious to us what this is.


Does anyone have any experience with the offlineasm process and could suggest some some ideas? Some environment variable we need to set in our process maybe?


Thanks,


Jim

<div>
<div>
<p>Hello list,<br></p>
<p><br></p>
<p>We're having a curious thing happen in our port where&nbsp;<span>offsets</span><span>.rb
 selects a different backend than expected: X86 &nbsp;instead of X86_WIN.&nbsp;</span>&nbsp;</p>
<p><br></p>
<p>Background:<br></p>
<p><br></p>
<p>We're building on Windows with MSVC 2013, comparison to trunk are comparisons to WinCairo (our base).<br></p>
<p><br></p>
<p>We maintain our own variant of the offlineasm (build-LLDesiredOffsets.pl, build-LLIntAssembly, etc.) pipeline that avoids the makefiles and Perl but imitates their calls to the Ruby scripts underlying the overall&nbsp;process.<br></p>
<p><br></p>
<p>We also have our own process for generating LLIntOffsetsExtractor.exe, which I think is where our problem lies...<br></p>
<p><br></p>
<p>Our process still generates an MSVC solution that builds LLIntOffsetsExtractor.cpp and feeds into asm.rb, but ultimately results in X86 being selected as the active target instead of X86_WIN.<br></p>
<p><span><br></span></p>
<p><span>Obviously the problem is&nbsp;on our end and comes from some deviation from the existing process in trunk, but it's not obvious to us what this is.</span></p>
<p><span><br></span></p>
<p><span>Does anyone have any experience with the offlineasm process and could suggest some some ideas? Some environment variable we need to set in our process maybe?</span></p>
<p><span><br></span></p>
<p><span>Thanks,</span></p>
<p><span><br></span></p>
<p><span>Jim</span></p>
</div>
</div>
Malek Musleh | 3 Apr 18:38 2015
Picon

Increasing Input Sizes for JetStream benchmarks

Hi,

I was wondering if there are a different set of input sizes for the
different jetstream benchmarks available? I am running the benchmarks
in offline mode (local host essentially) and within an architectural
simulator where I would like to stress the memory subsystem a little
bit more.

Currently I run each benchmark individiaudlly, and I set the number of
iterations =3 for each (as is in the default case). I know I can
increase the number of iterations, but that will just make it run
longer, rather than increase the working set size.

I know that jetstream pulls some of its benchmarks from the other JS
suites (sunspider, Octane), but even searching for different input
sizes there hasn't helped.

If there doesn't currently exist larger input sets, can someone
provide guidance on how to appropriately increase the working set /
payload size for certain benchmarks?

Thanks,

Malek
Jiho Choi | 18 Mar 06:49 2015
Picon

What's the use of Structure for non-JS classes?

Hi,

I found out that Structure is created for non-JS classes (mostly when creating a VM instance), even for Structure itself. Is it there because such classes inherit from JSCell? And I guess they inherit from JSCell to make themselves GC'ed properly, right? If then, my question is whether those Structures are ever transitioned. I guess not. Could someone clarify these please?

Thanks,
Jiho
<div><div dir="ltr">Hi,<div><br></div>
<div>I found out that Structure is created for non-JS classes (mostly when creating a VM instance), even for Structure itself. Is it there because such classes inherit from JSCell? And I guess they inherit from JSCell to make themselves GC'ed properly, right? If then, my question is whether those Structures are ever transitioned. I guess not. Could someone clarify these please?</div>
<div><br></div>
<div>Thanks,</div>
<div>Jiho</div>
</div></div>
Sasi San | 6 Mar 17:54 2015
Picon

“createMediaStreamSource” of “AudioContext” is undefined using Safari browser !

Hi-

I am using Temasys’ Free WebRTC Plugin in my project with web kit audio APIs to get the audio stream. It works on Firfox and chrome  browsers except Safari which is complaining about “createMediaStreamSource” of “AudioContext” is undefined.

Please let me know when this API will be available for Safari. or Is there any other API available to capture the audio stream from "onAudioProcess" function.

Thanks,

Sasi

<div><div dir="ltr">
<p>Hi-<br></p>
<p>I am using Temasys&rsquo; Free WebRTC Plugin in my project with web kit audio 
APIs to get the audio stream. It works on Firfox and chrome&nbsp; browsers except Safari
 which is complaining about &ldquo;createMediaStreamSource&rdquo; of &ldquo;AudioContext&rdquo; 
is undefined.</p>
<p>Please let me know when this API will be available for Safari. or Is 
there any other API available to capture the audio stream from 
"onAudioProcess" function.</p>
<p>Thanks,</p>
<p>Sasi</p>
</div></div>
David Marsden | 19 Feb 14:06 2015

HTTP/2 Support?

Hi,

I’m not a developer, just a curious Mac user. Is HTTP/2 support coming to Safari (and/or) Webkit anytime
soon? Purely because I think stuff like this is cool, and I’d like to know if my favourite browser will
have it.

Thanks and thanks for making my favourite web browser/Web browser “Engine”.

Cheers,

DMx

_______________________________________________
webkit-help mailing list
webkit-help <at> lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-help
James Sandridge | 16 Feb 18:55 2015

WinCairo PC64 stability?

Hello list,


Been trying to get a handle on the stability of the PC64 build of WinCairo. Towards that end I've built all the required libs locally but I encounter a fair few number of issues, usually relating to curl or OpenSSL.


For example, when loading facebook.com I hit an access violation:


ntdll!RtlAnsiStringToUnicodeString+0x201
ntdll!RtlAllocateHeap+0xe8
MSVCR120!malloc+0x5b
LIBEAY32!CRYPTO_malloc+0x6a
LIBEAY32!bn_expand_internal+0x85
LIBEAY32!bn_expand2+0x1e
LIBEAY32!BN_copy+0x35
LIBEAY32!EC_GROUP_set_generator+0x7d
LIBEAY32!ec_group_new_from_data+0x300
LIBEAY32!EC_GROUP_new_by_curve_name+0x4c
LIBEAY32!eckey_type2param+0xcd
LIBEAY32!eckey_pub_decode+0x43
LIBEAY32!X509_PUBKEY_get+0x143
LIBEAY32!X509_get_pubkey_parameters+0xa0
LIBEAY32!X509_verify_cert+0x6a0
SSLEAY32!ssl_verify_cert_chain+0x115
SSLEAY32!ssl3_get_server_certificate+0x19e
SSLEAY32!ssl3_connect+0x251
SSLEAY32!ssl23_get_server_hello+0x3d5
SSLEAY32!ssl23_connect+0x29e

​Anyone else seeing issues like these?

Jim​


<div>
<div>
<p>Hello list,<br></p>
<p><br></p>
<p>Been trying to get a handle on the stability of the PC64 build of WinCairo. Towards that end I've built all the required libs locally but I encounter a fair few number of issues,
 usually relating to curl or OpenSSL.<br></p>
<p><br></p>
<p>For example, when loading facebook.com I hit an access violation:<br></p>
<p><br></p>
<div>
ntdll!RtlAnsiStringToUnicodeString+0x201</div>
<div>
ntdll!RtlAllocateHeap+0xe8</div>
<div>
MSVCR120!malloc+0x5b</div>
<div>
LIBEAY32!CRYPTO_malloc+0x6a</div>
<div>
LIBEAY32!bn_expand_internal+0x85</div>
<div>
LIBEAY32!bn_expand2+0x1e</div>
<div>
LIBEAY32!BN_copy+0x35<br>
</div>
<div>
LIBEAY32!EC_GROUP_set_generator+0x7d</div>
<div>
LIBEAY32!ec_group_new_from_data+0x300</div>
<div>
LIBEAY32!EC_GROUP_new_by_curve_name+0x4c</div>
<div>
LIBEAY32!eckey_type2param+0xcd</div>
<div>
LIBEAY32!eckey_pub_decode+0x43</div>
<div>
LIBEAY32!X509_PUBKEY_get+0x143</div>
<div>
LIBEAY32!X509_get_pubkey_parameters+0xa0</div>
<div>
LIBEAY32!X509_verify_cert+0x6a0</div>
<div>
SSLEAY32!ssl_verify_cert_chain+0x115</div>
<div>
SSLEAY32!ssl3_get_server_certificate+0x19e</div>
<div>
SSLEAY32!ssl3_connect+0x251</div>
<div>
SSLEAY32!ssl23_get_server_hello+0x3d5</div>
<div>
SSLEAY32!ssl23_connect+0x29e</div>
<div>
<br>
&#8203;Anyone else seeing issues like these?<br>
</div>
<div>
<br>
</div>
<div>
Jim&#8203;<br>
</div>
<p><br></p>
</div>
</div>
Lew Hollerbach | 15 Feb 23:44 2015

How WebKit builds HTTP GET Request headers, and how WebKit resolves relative paths in <link>s, <img>s, etc.

Hello,

 

In the most general terms, my question is around relative paths in links (e.g., <link>, <img>, <script>) and the related HTTP GET request, and the corresponding Request/Response headers: how WebKit builds the headers, and how WebKit resolves relative paths.

 

What happens if the URL to a resource is not an absolute URL but a relative one? My own testing suggests that the “Host” request-header field is what’s used to resolve relative paths. Is that correct? (If it isn’t correct, then what is used to resolve relative URLs?)

 

But, if it is, then how does the browser/WebKit know what the value of this field should be? Often — but certainly not always — the value is just the basic domain name, like “www.somesite.com”. But it can also have different sub-domains, like “assets.somesite.com”. So what does the browser use to determine this “host” value?

 

And, is there anything in a response-header — from the original request — that the browser uses to set this value? So, for a real example, if you go to “www.lordandtaylor.com”, when the page is loaded and parsed, the very first <script>’s “src” is

"/wcsstore/dojoHBC/dojo/dojo.js". So how does the browser know that the “host” value should be “www.lordandtaylor.com” here?

 

Then, a few <script>s later, a request goes to “http://1.shrd.lordandtaylor.com” (absolute URL), and the immediately following request again has a relative path of “/wcsstore/HBCStorefrontAssetStore/javascript/jquery.min.js”; again, how does the browser know to — again — use “www.lordandtaylor.com” for the “host” value for this second request?

 

This area is confusing for me and I don’t have the necessary knowledge to understand the inner workings here.

 

If we do end up knowing how this “host” value is arrived at, how can we — from within JavaScript — set it so that, as the page is parsed and rendered, the rendering engine can know what this “host” should be? Is there some global or window.variable, or other global setting that can be set via an API from JavaScript? Obviously the rendering engine (or some other part of the browser) must know what it is so that the Request-header is correctly set when the various HTTP GET requests — to fetch images, CSS files, JavaScript files, etc. — are invoked. Would you know how we can set this “host” value?

 

And, as I mentioned earlier, if it’s not “host” that determines how relative paths are resolved, then what is?

 

I’m trying to load a Website through your proxy, to bypass the same-origin restrictions, and have it fully rendered inside an <iframe>. Not for any nefarious purposes such as clickjacking; no, we’re building a consumer-facing app that features a way to view and browse any Website from the app, with some other features. And the app (a hybrid mobile app) runs inside embedded WebKit.

 

I know this can be done: A few companies have successfully implemented such a feature, for use cases such as customer service, co-browsing, etc. Every company that I know of who has successfully done this has been acquired — presumably exactly for this feature — and so their IP is clearly a trade secret and can’t be easily (if at all) gotten at.

 

If what we’re trying to do can’t be done using proxies, is there another way that you would work, that would result in the same ultimate experience — of being able to load any given Website into some container and have it be fully functional, allow all the links to be traversed and assets loaded?

 

Thanks for any and all insights, suggestions, and general help!

 

Lew

<div>

<div class="Section1">

<p class="MsoNormal"><span>Hello,<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>In
the most general terms, my question is around relative paths in links (e.g.,
&lt;link&gt;, &lt;<span class="SpellE">img</span>&gt;, &lt;script&gt;) and the
related HTTP GET request, and the corresponding Request/Response headers: how
WebKit builds the headers, and how WebKit resolves relative paths.<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>What
happens if the URL to a resource is not an absolute URL but a relative one? My
own testing suggests that the &ldquo;Host&rdquo; request-header field is
what&rsquo;s used to resolve relative paths. Is that correct? (If it
isn&rsquo;t correct, then what is used to resolve relative URLs?)<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>But,
if it is, then how does the browser/WebKit know what the value of this field
should be? Often &mdash; but certainly not always &mdash; the value is just the
basic domain name, like &ldquo;www.somesite.com&rdquo;. But it can also have
different sub-domains, like &ldquo;assets.somesite.com&rdquo;. So what does the
browser use to determine this &ldquo;host&rdquo; value?<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>And,
is there anything in a response-header &mdash; from the original request
&mdash; that the browser uses to set this value? So, for a real example, if you
go to &ldquo;www.lordandtaylor.com&rdquo;, when the page is loaded and parsed,
the very first &lt;script&gt;&rsquo;s &ldquo;<span class="SpellE">src</span>&rdquo;
is <p></p></span></p>

<p class="MsoNormal"><span>"/<span class="SpellE">wcsstore</span>/<span class="SpellE">dojoHBC</span>/dojo/dojo.js".
So how does the browser know that the &ldquo;host&rdquo; value should be
&ldquo;www.lordandtaylor.com&rdquo; here?<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>Then,
a few &lt;script&gt;s later, a request goes to
&ldquo;http://1.shrd.lordandtaylor.com&rdquo; (absolute URL), and the
immediately following request again has a relative path of &ldquo;/<span class="SpellE">wcsstore</span>/<span class="SpellE">HBCStorefrontAssetStore</span>/javascript/≤span class="SpellE">jquery.min.js</span>&rdquo;; again, how does the browser know to &mdash;
again &mdash; use &ldquo;www.lordandtaylor.com&rdquo; for the
&ldquo;host&rdquo; value for this second request?<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>This
area is confusing for me and I don&rsquo;t have the necessary knowledge to
understand the inner workings here.<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>If
we do end up knowing how this &ldquo;host&rdquo; value is arrived at, how can
we &mdash; from within JavaScript &mdash; set it so that, as the page is parsed
and rendered, the rendering engine can know what this &ldquo;host&rdquo; should
be? Is there some global or <span class="SpellE">window.variable</span>, or other
global setting that can be set via an API from JavaScript? Obviously the
rendering engine (or some other part of the browser) must know what it is so
that the Request-header is correctly set when the various HTTP GET requests
&mdash; to fetch images, CSS files, JavaScript files, etc. &mdash; are invoked.
Would you know how we can set this &ldquo;host&rdquo; value?<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>And,
as I mentioned earlier, if it&rsquo;s not &ldquo;host&rdquo; that determines
how relative paths are resolved, then what is?<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>I&rsquo;m
trying to load a Website through your proxy, to bypass the same-origin
restrictions, and have it fully rendered inside an &lt;iframe&gt;. Not for any
nefarious purposes such as <span class="SpellE">clickjacking</span>; no,
we&rsquo;re building a consumer-facing app that features a way to view and
browse any Website from the app, with some other features. And the app (a
hybrid mobile app) runs inside embedded WebKit.<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>I
know this can be done: A few companies have successfully implemented such a
feature, for use cases such as customer service, co-browsing, etc. Every
company that I know of who has successfully done this has been acquired &mdash;
presumably exactly for this feature &mdash; and so their IP is clearly a trade
secret and can&rsquo;t be easily (if at all) gotten at.<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>If
what we&rsquo;re trying to do can&rsquo;t be done using proxies, is there
another way that you would work, that would result in the same ultimate
experience &mdash; of being able to load any given Website into some container
and have it be fully functional, allow all the links to be traversed and assets
loaded?<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>Thanks
for any and all insights, suggestions, and general help!<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>Lew<p></p></span></p>

</div>

</div>
ankit srivastav | 31 Jan 16:37 2015
Picon

Help to understand Painting/Drawing in webkit

Hi All,

I'm new to webkit in context of Painting/Drawing.

I'm trying to use my own algo instead of Webkit defaults Bilenear Interpolation algo for interpolation of images on a webpage.
That is if destImage Size is greater then SrcImage Size my algo will also come into picture alongside Webkit Bilinear.

But the problem is my algo take lots of time to do the interpolation, hence the page load becomes slow.
Specially for large images it takes too much time to load the image and hence the webpage.

I have tried to use my algo in PlatformGraphicsContext.cpp along with Bilinear.

If I'm using a separate thread to for my algo.
I'm not getting the exact result i.e. once the images are drawn by Bilinear it is not been drawn after my algo.

It means I need to fire an event after interpolation is done by my algo, so that images will be drawn using the data from my algo.

Please if someone can tell me the Painting/Drawing mechanism of webkit it would be great.

Regards,
Ank
<div><div dir="ltr">
<span>Hi All,</span><div><br></div>
<div>I'm new to webkit in context of Painting/Drawing.</div>
<div><br></div>
<div>I'm trying to use my own algo instead of Webkit defaults Bilenear Interpolation algo for interpolation of images on a webpage.</div>
<div>That is if destImage Size is greater then SrcImage Size my algo will also come into picture alongside Webkit Bilinear.</div>
<div><br></div>
<div>But the problem is my algo take lots of time to do the interpolation, hence the page load becomes slow.</div>
<div>Specially for large images it takes too much time to load the image and hence the webpage.</div>
<div><br></div>
<div>I have tried to use my algo in PlatformGraphicsContext.cpp along with Bilinear.</div>
<div><br></div>
<div>If I'm using a separate thread to for my algo.</div>
<div>I'm not getting the exact result i.e. once the images are drawn by Bilinear it is not been drawn after my algo.</div>
<div><br></div>
<div>It means I need to fire an event after interpolation is done by my algo, so that images will be drawn using the data from my algo.</div>
<div><br></div>
<div>Please if someone can tell me the Painting/Drawing mechanism of webkit it would be great.</div>
<div><br></div>
<div>Regards,</div>
<div>Ank</div>
</div></div>
Ryan Molden | 30 Jan 20:36 2015
Picon

Dynamically injected script file execution ordering question

Hello, I am looking at using WebKit as an HTML rendering/JS host in a native C++ application. Currently the application uses IE via the WebOC. I have WebKit running and loading the HTML / JS but I have encountered a problem and I was wondering if you could think of any work-arounds.

 

Problem: The execution order of scripts added to the DOM via insertBefore seems to be after scripts statically declared in the HTML file.

 

I don’t have any doubts that WebKit is proper here vis-à-vis the standard (though I couldn’t find anything specific in the standard that made it clear one way or another). Basically what I see is that scripts dynamically injected seem to be executed AFTER the statically declared ones, even if inserted before them and even if the dynamically injected ones set async to false on the created script node.

 

In IE it seems different. Imagine this scenario, in the root HTML page we have:

 

    <script src="A.js" type="text/javascript"></script>

    <script src="B.js" type="text/javascript"></script>

 

And assume A.js has JS code that injects another script, let’s call it A1, (that it dynamically locates, which is why it can’t be declared in the markup).

 

In IE I see this execution order:

 

A -> A1 -> B

 

In WebKit I see this execution order


A-> B -> A1

 

I speculate IE is executing the scripts in the HTML in order and the injection done by A is causing the new script to show up and be executed before it gets to script B. WebKit on the other hand seems to be enqueing all the scripts from the HTML and then executing them in order, so when it hits A and A injects a new script it gets placed at the end of the execution queue and executed after B.

 

This is a problem because in our case A1 injects a bunch of global functions/properties that B depends on, so if B executes first, well things don’t go so well.

 

I could indirect B so it simply did a dynamic injection of its contents like A does, call it B1 (I presume that would mean B1 would then be executed after A1), but that is non-ideal if there are a lot of scripts involved.

 

Ryan

<div>
<div class="WordSection1">
<p class="MsoNormal">Hello, I am looking at using WebKit as an HTML rendering/JS host in a native C++ application. Currently the application uses IE via the WebOC. I have WebKit running and loading the HTML / JS but I have encountered a problem and I was wondering
 if you could think of any work-arounds.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Problem: The execution order of scripts added to the DOM via insertBefore seems to be after scripts statically declared in the HTML file.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">I don&rsquo;t have any doubts that WebKit is proper here vis-&agrave;-vis the standard (though I couldn&rsquo;t find anything specific in the standard that made it clear one way or another). Basically what I see is that scripts dynamically injected seem to
 be executed AFTER the statically declared ones, even if inserted before them and even if the dynamically injected ones set async to false on the created script node.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">In IE it seems different. Imagine this scenario, in the root HTML page we have:<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp; &lt;script src="A.js" type="text/javascript"&gt;&lt;/script&gt;<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp; &lt;script src="B.js" type="text/javascript"&gt;&lt;/script&gt;<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">And assume A.js has JS code that injects another script, let&rsquo;s call it A1, (that it dynamically locates, which is why it can&rsquo;t be declared in the markup).
<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">In IE I see this execution order:<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">A -&gt; A1 -&gt; B<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">In WebKit I see this execution order<p></p></p>
<p class="MsoNormal"><br>
A-&gt; B -&gt; A1<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">I speculate IE is executing the scripts in the HTML in order and the injection done by A is causing the new script to show up and be executed before it gets to script B. WebKit on the other hand seems to be enqueing all the scripts from
 the HTML and then executing them in order, so when it hits A and A injects a new script it gets placed at the end of the execution queue and executed after B.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">This is a problem because in our case A1 injects a bunch of global functions/properties that B depends on, so if B executes first, well things don&rsquo;t go so well.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">I could indirect B so it simply did a dynamic injection of its contents like A does, call it B1 (I presume that would mean B1 would then be executed after A1), but that is non-ideal if there are a lot of scripts involved.<p></p></p>
<p class="MsoNormal"><p>&nbsp;</p></p>
<p class="MsoNormal">Ryan<p></p></p>
</div>
</div>

Gmane