Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SyntaxError: Parse Error only happens in safari

Im getting SyntaxError: Parse Error, only on safari. Here is the code in question.

<script type="text/javascript">
$(document).ready(function() {
    $("form").transload({
        auth: {key: "b7deac9c96af6c745e914e25d0350baa"},
        flow: {
            encode: {
                "use": ":original",
                "robot": "/video/encode",
                "preset": "flash",
                "width": 480,
                "height": 320
            },
            encode_iphone: {
                "use": ":original",
                "robot": "/video/encode",
                "preset": "iphone"
            },
            export: {
                "use": ["encode","encode_iphone"],
                "robot": "/s3/store"
            }
        }
    });
});
</script>

I am using transloadit a jquery plugin. which works on every other page and is loading fine on safari by the looks of it.

The errors is on line 44 which is

export: {

Can anyone see anything wrong with that page?

like image 415
Josh Crowder Avatar asked May 20 '10 00:05

Josh Crowder


1 Answers

The following words are used as keywords in proposed extensions and are therefore reserved to allow for the possibility of future adoption of those extensions.

class enum extends super const export import

ECMAScript Language Specification, section 7.6.1 Reserved Words

Other interpreters might be more liberal about them, which might explain that it only gives a SyntaxError in JavascriptCore (Safari's javascript interpreter).

like image 168
Adrien Avatar answered Sep 19 '22 20:09

Adrien