首页> 外文会议>European conference on object-oriented programming >Combining Form and Function: Static Types for JQuery Programs
【24h】

Combining Form and Function: Static Types for JQuery Programs

机译:组合形式和功能:JQuery程序的静态类型

获取原文

摘要

The jQuery library defines a powerful query language for web applications' scripts to interact with Web page content. This language is exposed as jQuery's API, which is implemented to fail silently so that incorrect queries will not cause the program to halt. Since the correctness of a query depends on the structure of a page, discrepancies between the page's actual structure and what the query expects will also result in failure, but with no error traces to indicate where the mismatch occurred. This work proposes a novel type system to statically detect jQuery errors. The type system extends Typed JavaScript with local structure about the page and with multiplicities about the structure of containers. Together, these two extensions allow us to track precisely which nodes are active in a jQuery object, with minimal programmer annotation effort. We evaluate this work by applying it to sample real-world jQuery programs.
机译:jQuery库为Web应用程序的脚本定义了强大的查询语言,以与Web页面内容进行交互。该语言作为jQuery的API公开,该API的实现可以使其静默失败,从而使不正确的查询不会导致程序暂停。由于查询的正确性取决于页面的结构,因此页面的实际结构与查询预期之间的差异也会导致失败,但不会显示任何错误信息以指示发生不匹配的地方。这项工作提出了一种新颖的类型系统来静态检测jQuery错误。类型系统使用页面的局部结构和容器结构的多重性扩展了Typed JavaScript。这两个扩展一起使我们能够以最少的程序员注释工作来精确跟踪jQuery对象中哪些节点处于活动状态。我们通过将其应用于示例现实jQuery程序来评估这项工作。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号