[Pas2js] First impressions and Queries

C Western l at c-m-w.me.uk
Thu Jan 25 09:52:14 CET 2018


On 25/01/18 08:45, C Western wrote:
> On 25/01/18 08:12, Mattias Gaertner wrote:
>> On Wed, 24 Jan 2018 21:58:04 +0000
>> C Western <l at c-m-w.me.uk> wrote:
>>
>>> [...]
>>> 1. The .map files produced always seem to be corrupt - they always 
>>> begin:
>>>
>>> )]}
>>> {"version":3,"file":"ar.js","sources":["/home....
>>>
>>> which doesn't look right. Am I doing something wrong? Fortunately the
>>> code produced is sufficiently close to the original that debugging with
>>> the firefox developer tools was straightforward.
>>
>> If you mean the )]}, this avoids potential XSSI attacks and is
>> recommended in the specs:
>> https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.h7yy76c5il9v 
>>
>>
>> In what browser does it not work?
>>
> Firefox on Fedora gives:
> 
> Source map error: SyntaxError: JSON.parse: unexpected character at line 
> 1 column 1
> 
> following your prompt I tried Chrome, and that does seem to be working.
> 
> Colin

PS - if it makes a difference I was testing with file:// urls, and the 
spec explicitly mentions http.

Colin


More information about the Pas2js mailing list