Knockout.js 2.2 发布,JavaScript UI 库

Knockout.js 2.2 版本已发布,此版本的 JavaScript 库增强了 with、if 和 ifnot 绑定,使其保留初始 DOM 元素,更加轻量级,并兼容第三方库的特殊行为。依赖检测机制更智能,避免不必要的订阅操作。新增 peek 函数,用于高级依赖检测控制。此外,还改进了 AMD 支持,修复了 IE10 自动完成的问题。

Knockout.js 2.2 发布了,Knockout 是个JavaScript library,帮助创建丰富的显示和编辑器UI,通过干净的底层数据模型。你可以在任何时候动态更新UI的选择部分。

 

Knockout.js 2.2 主要改进内容包括:

  • The with, if, and ifnot bindings have been enhanced to preserve their original DOM elements on initial binding, so they are lighter and won’t unnecessarily strip out any special behaviours inserted by third-party libraries. I know a lot of people asked for this.
  • The dependency detection mechanism is now smarter in many places to avoid registering subscriptions that would be unnecessary no-ops
  • Support for IE10 (well, we basically already supported it, but there was one edge-case issue with autocompletion that we fixed)
  • Improved AMD support (the ko variable is now available in the context of all custom binding handlers, even if it isn’t in global scope)
  • The text binding can now be used in a virtual element (e.g., <!--ko text: myValue--><!--/ko-->)
  • Observable and computed properties have a new peek function for advanced control over dependency detection
  • Bugfixes
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值