Comments (3)
我试着调了一下,没有发现这个问题哦,可以给个在线demo吗?
from reading-zepto.
看了一下 v1.0
的源码,V1.0
的 $
函数返回的确实是数组。你应该用的是 v1.0
。
其差别应该在 Z
函数的实现上。
v1.0
中是这样的 https://github.com/madrobby/zepto/blob/v1.0/src/zepto.js#L134
我看的 1.2.0
的源码中是这样的 https://github.com/madrobby/zepto/blob/v1.2.0/src/zepto.js#L129
v1.0
中直接调用函数,返回的 dom
是数组(注意qsa
中已经用 slice
将取得的节点转换成数组)。
1.2.0
中以构造函数方式调用,返回的类数组的 constructor
是zepto.Z。
from reading-zepto.
看了哈,是的。多谢。
from reading-zepto.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reading-zepto.