SyntaxError:Parse Error仅在safari中发生 [英] SyntaxError: Parse Error only happens in safari

查看:93
本文介绍了SyntaxError:Parse Error仅在safari中发生的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到的是SyntaxError:Parse Error,仅适用于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>

我正在使用transloadit一个jquery插件。它适用于其他所有页面,并且通过它的外观在safari上正常加载。

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

错误在第44行,

export: {

任何人都可以看到该页面有什么问题吗?

Can anyone see anything wrong with that page?

推荐答案


以下单词在建议的扩展中用作关键字,因此保留用于以后可能采用这些扩展。

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

class enum extends super const export import

ECMAScript语言规范 7.6.1保留字

其他解释器可能对它们更加自由,这可能解释它只能在JavascriptCore中提供<​​code> SyntaxError (Safari的javascript翻译)。

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

这篇关于SyntaxError:Parse Error仅在safari中发生的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆