我得到SyntaxError:Parse Error,仅在safari上.这是有问题的代码.
<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","preset": "iphone" },export: { "use": ["encode","encode_iphone"],"robot": "/s3/store" } } }); }); </script>
我正在使用transloadit一个jquery插件.它适用于其他所有页面,并且通过它的外观在safari上正常加载.
错误在第44行,即
export: {
任何人都可以看到该页面有任何问题吗?
解决方法
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,第7.6.1节保留字
其他解释器可能对它们更加自由,这可能解释它只在JavascriptCore中提供了一个SyntaxError(Safari的javascript解释器).