我正在阅读 Sizzle 源代码。我看到了下面的定义
function Sizzle(selector, context, results, seed)
我的问题是参数种子的含义是什么?我在 API 文档中找不到它
谢谢
附录
该seed
参数用于 jQuery 的事件处理程序源(从 2.1.4 开始):
jQuery.find = Sizzle;
// [...]
jQuery.event = {
// [..]
handlers: function( event, handlers ) {
// [..]
// Find delegate handlers
if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
for ( ; cur !== this; cur = cur.parentNode || this ) {
// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
if ( cur.disabled !== true || event.type !== "click" ) {
matches = [];
for ( i = 0; i < delegateCount; i++ ) {
handleObj = handlers[ i ];
// Don't conflict with Object.prototype properties (#13203)
sel = handleObj.selector + " ";
if ( matches[ sel ] === undefined ) {
matches[ sel ] = handleObj.needsContext ?
jQuery( sel, this ).index( cur ) >= 0 :
//
// Right here to find if cur matches the
// delegated event handler's selector.
//
jQuery.find( sel, this, null, [ cur ] ).length;
// There: -----------------------^
}
if ( matches[ sel ] ) {
matches.push( handleObj );
}
}
if ( matches.length ) {
handlerQueue.push({ elem: cur, handlers: matches });
}
}
}
}
},