Every line of 'js query selector' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
1 export function query(selector, scope = document) { 2 return scope.querySelector(selector); 3 }
206 function query(selector, context) { 207 return queryAll(selector, context)[0]; 208 }
14 function query(selector, context) { 15 /* jshint -W103 */ 16 var ret = root(selector, context); 17 ret._$ = $; 18 19 // We need to remap ourselves to the private context and unfortunately 20 // the return behavior of the Cheerio constructo makes this difficult to 21 // implement without ramapping after the fact. 22 ret.__proto__ = $.fn; 23 return ret; 24 }
93 query(selector) { 94 throw new Error('the query method must be implemented by the subclass'); 95 }
23 function $(selector) { 24 return jQuery(selector, element); 25 }
26 function query(selector, context) { 27 return queryAll(selector, context)[0]; 28 }
162 $(selector) { 163 164 return this.evaluate( 165 selector => document.querySelector( selector ), selector 166 ); 167 }