简体   繁体   English

Microsoft Dynamics CRM 2013中的Javascript兼容性错误

[英]Javascript compatability errors with Microsoft Dynamics CRM 2013

I am running the Custom Code Validation Tool for Microsoft Dynamics CRM 2013 and getting the following being flagged up as potential issues. 我正在运行Microsoft Dynamics CRM 2013的自定义代码验证工具,并将以下内容标记为潜在问题。

  • The occurrence of :: was located 1 time(s) in this web resource. :: ::的出现在此Web资源中位于1时间。
  • The occurrence of .text was located 10 time(s) in this web resource. 在此Web资源中,.text的出现位于10次。
  • The occurrence of ActiveXObject( was located 2 time(s) in this web resource. ActiveXObject()的出现在该Web资源中位于2次。
  • The occurrence of .attachEvent( was located 4 time(s) in this web resource. .attachEvent()的出现在该Web资源中位于4次。
  • The occurrence of .childNodes.length was located 4 time(s) in this web resource. .childNodes.length的出现在该Web资源中位于4次。
  • The occurrence of .firstChild was located 29 time(s) in this web resource. 在此Web资源中,.firstChild的出现位于29时间。
  • The occurrence of .lastChild was located 3 time(s) in this web resource. .lastChild的出现在该网络资源中位于3时间。
  • The occurrence of .nextSibling was located 8 time(s) in this web resource. .nextSibling的发生在该Web资源中位于8次。
  • The occurrence of .previousSibling was located 2 time(s) in this web resource. .previousSibling的发生在该Web资源中位于2次。
  • The occurrence of .contains( was located 7 time(s) in this web resource. 在此Web资源中,.contains(的出现时间为7次。
  • The occurrence of dblclick was located 1 time(s) in this web resource. dblclick的发生在该Web资源中位于1次。
  • The occurrence of .dir was located 6 time(s) in this web resource. 在该Web资源中,.dir的出现位于6个时间。
  • The occurrence of .innerText was located 1 time(s) in this web resource. .innerText的出现在该网络资源中位于1时间。
  • The occurrence of .outerHTML was located 2 time(s) in this web resource. .outerHTML的出现在该Web资源中位于2次。
  • The occurrence of .currentStyle was located 9 time(s) in this web resource. 在此Web资源中,.currentStyle的出现位于9时间。
  • The occurrence of opacity= was located 3 time(s) in this web resource. 该Web资源中opacity =的出现时间为3次。
  • The occurrence of .srcElement was located 1 time(s) in this web resource. 该Web资源中.srcElement的出现位置为1次。
  • The occurrence of .returnValue was located 2 time(s) in this web resource. .returnValue的出现在该Web资源中位于2次。
  • The occurrence of .add( was located 9 time(s) in this web resource. .add(的出现在此Web资源中位于9时间。

these are all coming from the one JavaScript file which is using jQuery JavaScript Library v1.6.1 这些都来自使用jQuery JavaScript Library v1.6.1的一个JavaScript文件。

Can anyone tell me: - apart from the ActiveXObject which i know is IE only if these are an issue in other mainstream browsers like Firefox / chrome. 谁能告诉我:-除了ActiveXObject,我知道它是IE,只有在其他主流浏览器(例如Firefox / chrome)中存在这些问题时,IE才是IE。 - Do I need to update the version of the java script library - Or do I need to replace these method calls with compatible ones? -是否需要更新Java脚本库的版本?还是需要将这些方法调用替换为兼容的方法调用?

The Custom Code Validation Tool will always return issues for any jQuery library, this because jQuery support multiple browsers (including old one) and contains code to keep this compatibility. 自定义代码验证工具将始终返回任何jQuery库的问题,因为jQuery支持多种浏览器(包括旧的浏览器),并且包含保持这种兼容性的代码。

The main point is your use of jQuery library inside your CRM, according to MSDN (I refer to the CRM 2011 version because the CRM 2013 isn't out yet) 根据MSDN ,主要要点是在CRM内使用jQuery库(我指的是CRM 2011版本,因为CRM 2013尚未发布)

The only supported use of jQuery in the Microsoft Dynamics CRM 2011 web application is to use the jQuery.ajax method to retrieve data from the REST endpoint. Microsoft Dynamics CRM 2011 Web应用程序中唯一受支持的jQuery使用是使用jQuery.ajax方法从REST端点检索数据。 Using jQuery to modify Microsoft Dynamics CRM 2011 application pages or forms is not supported. 不支持使用jQuery修改Microsoft Dynamics CRM 2011应用程序页面或表单。 You may use jQuery within your own HTML web resource pages. 您可以在自己的HTML Web资源页面中使用jQuery。

So if you use jQuery for the REST endpoint and inside your WebResources you don't need to worry about the issues, but if you use it for manipulate the DOM (for example change the background color of a field) it is unsupported and can lead to issues with current and future releases. 因此,如果您将jQuery用于REST终结点并在WebResources内部使用,则无需担心这些问题,但是,如果将它用于操纵DOM(例如更改字段的背景颜色),则该格式不受支持并且可能导致当前和将来版本的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM