迷渡
迷渡
今天在 github trending 看到一个项目:[stratiformltd/react-loadable-visibility](https://github.com/stratiformltd/react-loadable-visibility) > A wrapper around [react-loadable](https://github.com/thejameskyle/react-loadable) and [loadable-components](https://github.com/smooth-code/loadable-components) to load elements that are visible on the page. react-loadable-visibility 包装了 react-loadable 和 loadable-components,并且使用了 IntersectionObserver 当指定元素进入到 viewport 时加载组件。 ##...
@bl4ckn1ght 新建了 issue #3 讨论 `scrollIntoView` 和 `scrollIntoViewIfNeeded`。
@Tao-Quixote 在 issues 讨论是可以直接贴图片的
2年了,终于填坑了
**始终会与 attribute 保持一致**。`setAttribute` 这个 api 操作的就是 attribute。如果第二个参数传 `null`,则会变成 `"null"`。
@xusanduo08 可能我说的不是很清楚。视图(**HTML**)总是和 attribute 保持一致,这里的视图指的是 HTML,而非用户看到的渲染结果。
@xusanduo08 关于 value 的规范: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#concept-fe-value 规范中使用了 control:控件。 > A control's value is its internal state. As such, it **might not** match the user's current input. 表单控件的值是它的内部状态。可能与用户的当前输入不同。 规范中还举了 2 个例子: -...
@Tao-Quixote 写的不错,分析的很深入。 > JavaScript 中并不存在 “真正的数组”,现有的数组是魔改版本的对象 这个有点那啥了。 按这个逻辑,JavaScript 就没有真正的数组、函数、……了。 - 数组是 Array 的实例,Array 继承自 Object 和 Function。 - 正则表达式是 RegExp 的,RegExp 继承自 Object 和 Function。 - 函数是 Function 的,Function 继承自...
再补一个 test case:https://jsperf.com/document-fragment-test-peluchetti/38
@imis12 https://jsfiddle.net/Lzo73ozz/ 如果没有获得焦点,select 会变长。 在 2 秒之内获得焦点(select 展开)时,select 也会边长,但是 option 不变;当关闭下拉选项,再次打开后,option 变了。 我猜可能是 Chrome 是在触发 dropdown 之后不再监听 option 的变化了。 - FF 可以 - Chrome 没有变化 - Edge 没有变化