Re: [eventsource-tests] {dedicated-worker,shared-worker}/eventsource-constructor-non-same-origin

On Tue, 13 Aug 2013 15:47:54 +0200, Arthur Barstow <art.barstow@nokia.com>  
wrote:

> Hi Simon - but isn't that new line commented-out? [Sorry for my JS  
> newbie Qs]

The test is doing a non-obvious trick. It's commented out from the initial  
HTML page load. However, the test then opens a worker with the same URL  
(modulo the fragment), which means that the same source gets interpreted  
as javascript by the worker. In javascript, <!-- is a line comment (like  
//), so the code at the top gets executed, while the part between /* ...  
*/ is ignored.

I was the one who came up with and started using the above trick, so sorry  
for causing confusion. :-)

-- 
Simon Pieters
Opera Software

Received on Tuesday, 13 August 2013 14:03:12 UTC