Git Product home page Git Product logo

jquery-errata-support's People

Contributors

nuysoft avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

jquery-errata-support's Issues

第30页

表格里的特殊符号 > 的字符代码和数字代码印反了

疑似勘误

P87关于checkSet的说明,两次出现从右向左的查找方式,第二次应该是从左向右的查找方式

20处疑似错误

  1. 22页第9行“使用ocumentFragment一次插入多个节点”。应该为DocumentFragmen,少了个字母D
  2. 22页第11行,讲解中说缓存要第3次才能使用,让人很不理解。因为正常情况下,第二次就能使用。这其实是jQuery的一个bug(http://bugs.jquery.com/ticket/11669)。如果本书将来出第二版,建议加上说明。
  3. 30页表2-3的第5行, &#62 与 > 位置反了
  4. 31页例1,代码根本运行不到这个分支,会走源代码126行的分支。
  5. 33页例子div.innerHTML = 'div
    <script></script>
    ';需要对</script>中的反斜杠转义
  6. 50页,代码后紧跟的文字描述 “第241行:定义方法.push”应为“第241行:定义方法.pushStack”
  7. 62页3-4行,有拼写错误。“如何合法,才会执行” 应用为“如果合法,才会执行”
  8. 106页3.8.2中,第2行,“例如$("div + span")、$(".lastdiv + span") ”,两处例子中的 + 应为 >
  9. 114页 1.后缀正则不对,源码中是/(?![^[]_])(?![^(]))/而书中写成了/(?![^[]_])(?![^()))/
  10. 157页3.12.11标题中hidden应为伪类:hidden,少了冒号
  11. 193页,图5-5中, jQuery.date(应用为jQuery.data(
  12. 211页,最后一行deleteelem[ internalKey]; 少了空格应用为 delete elem[internalKey
  13. 250页 7.2.7第三行“在其他浏览器中,属性selected为false”。应该“属性selected为true”
  14. 312页中 标题1.boolHooks.get及标题2.boolHooks.set两处boolHooks都应该为boolHook
  15. 359页中“例如,IE9+、Opera、FireFox会自动把它同步为true”。我在Opera26中测试的结果是false
  16. 364页,倒数第4行 e = e || window.e,此处应为 e = e || window.event
  17. 371页和382页中,“例如, “clickkeydown””在click和keydown之间应该有空格才对
  18. 389页图中removeEventListener写成了temoveEventListener
  19. 396页倒数第4行和倒数第3行,说triggerHandler中有“并模拟冒泡过程”。triggerHandler是不模拟冒泡过程的
  20. blur 写成了blue错误。
    403页中“手动触发的是focus/blue”
    406页图9-8中“避免同时触发多个focus或blue事件”
    407图9-9 blue

文字错误

  1. 178页
    第1195行,异步队列的初试状态为待定pending 应该是初始状态
  2. 183页 小结,
    --创建异步队列deferred
    --把只读副本fromise 应该是promise

70页,jQuery.inArray()

通常我们会比较jQuery.inArray()的返回值是否大于0,来判断某个指定的元素是否是数组中的元素,就像下面这样:
if ( jQuery.inArray ( elem, array ) > 0 ){

}

我觉得应该是>-1 或者 != -1。
我参考了下官网API文档, https://api.jquery.com/jQuery.inArray/

第179页底部,有个地方我觉得写得不是很对

第1219行:在便捷方法always()中,采用链式语法依次调用方法done()、fail()重复添加回调函数,并返回this以继续支持链式语法。调用方法done()、fail()时,关键字this始终指向当前异步队列,因此实际上不借用方法apply()也可以用链式语法。

这是作者在第179页底部对deffered.always()的一个解释,我觉得那里必须要用apply(),而且那里跟this关系不大。
主要是因为deffered.done()也就是donelist.add()的参数是多个回调函数,而deffered.always()中要传递给donelist.done()的参数是它(即deffered.always())的arguments,它是一个类数组,也就是说donelist.add()接受的是一个类数组,而非多个参数。所以必须要用apply()才能使参数正确传递。

第12页

原文:“如果构造函数有返回值,运算符new所创建的对象会被抛弃”
严谨的说应该是:“如果构造函数有(非基本类型(Undefined、Null、Boolean、Number、String)的)返回值,运算符new所创建的对象会被抛弃”

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.