mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
23 lines
No EOL
449 B
JavaScript
23 lines
No EOL
449 B
JavaScript
define([
|
|
],
|
|
|
|
function () {
|
|
|
|
"use strict";
|
|
|
|
function QuerySelector() {
|
|
if (!document) {
|
|
throw new Error("Using QuerySelector, but window.document is not defined.");
|
|
}
|
|
}
|
|
|
|
QuerySelector.prototype.$ = function(selector) {
|
|
return document.querySelector(selector);
|
|
}
|
|
|
|
QuerySelector.prototype.$$ = function(selector) {
|
|
return document.querySelectorAll(selector);
|
|
}
|
|
|
|
return new QuerySelector();
|
|
}); |