MCPcopy Create free account
hub / github.com/aspnet/AzureSignalR-samples / compile

Function compile

aspnet-samples/ChatRoomLocal/Scripts/jquery-3.7.1.js:2568–2598  ·  view source on GitHub ↗
( selector, match /* Internal Use Only */ )

Source from the content-addressed store, hash-verified

2566}
2567
2568function compile( selector, match /* Internal Use Only */ ) {
2569 var i,
2570 setMatchers = [],
2571 elementMatchers = [],
2572 cached = compilerCache[ selector + " " ];
2573
2574 if ( !cached ) {
2575
2576 // Generate a function of recursive functions that can be used to check each element
2577 if ( !match ) {
2578 match = tokenize( selector );
2579 }
2580 i = match.length;
2581 while ( i-- ) {
2582 cached = matcherFromTokens( match[ i ] );
2583 if ( cached[ expando ] ) {
2584 setMatchers.push( cached );
2585 } else {
2586 elementMatchers.push( cached );
2587 }
2588 }
2589
2590 // Cache the compiled function
2591 cached = compilerCache( selector,
2592 matcherFromGroupMatchers( elementMatchers, setMatchers ) );
2593
2594 // Save selector and tokenization
2595 cached.selector = selector;
2596 }
2597 return cached;
2598}
2599
2600/**
2601 * A low-level selection function that works with jQuery's compiled

Callers 2

jquery-3.7.1.jsFile · 0.70
selectFunction · 0.70

Calls 3

tokenizeFunction · 0.70
matcherFromTokensFunction · 0.70
matcherFromGroupMatchersFunction · 0.70

Tested by

no test coverage detected