在Google Maps绘图库中禁用“严格使用”(用于与asp.net __doPostBack兼容) [英] Disable 'use strict' in Google Maps Drawing Library (for compatibility with asp.net __doPostBack)

查看:124
本文介绍了在Google Maps绘图库中禁用“严格使用”(用于与asp.net __doPostBack兼容)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在Google地图绘制库中关闭严格使用(可通过​​ http://maps.google.com/maps/api/js?libraries=drawing&sensor=false )。

这对我来说从未成为问题,但是我相信你们中的一些人知道,JavaScript的严格模式与asp.net的__doPostBack方法不兼容,并且会抛出一个Firefox和Chrome出现错误(非法访问严格的模式调用者函数或访问ff中的访问权限)。

唉,绘图库和__doPostBack功能对于我正在开发的应用程序来说都是必不可少的,所以我不能简单地删除其中一个。

据我所知,不可能简单地下载独立于完整地图api的图书馆,并且注释掉违规行。如果我错了,我会很高兴。



我不确定是否将此标记为JavaScript,所以如果我在错误的地方道歉。

非常感谢任何帮助。



克里斯。

解决方案

只需下载,保存为 .js ,并注释掉(或删除)use strict行。


Is it possible to turn off 'use strict' within the Google maps drawing library (accessed through http://maps.google.com/maps/api/js?libraries=drawing&sensor=false).

This has never been an issue for me before but as I'm sure some of you are aware, JavaScript's strict mode is incompatible with asp.net's __doPostBack method and throws an error in Firefox and Chrome( Illegal access to a strict mode caller function, or access censored in ff).

Alas both the drawing library and the ability to __doPostBack are imperative to the application I am working on, so I cannot simply remove one or the other.

As far as I am aware it is not possible to simply download the library independently of the full maps api and comment out the offending line. If I am wrong on this I will be overjoyed.

I wasn't sure whether or not to tag this as JavaScript so If I was in the wrong there apologies.

Any help greatly appreciated.

Chris.

解决方案

Just download the library, save it as .js, and comment out (or remove) the "use strict" line.

这篇关于在Google Maps绘图库中禁用“严格使用”(用于与asp.net __doPostBack兼容)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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