funcunit
Version:
<!-- @hide title
31 lines • 1.15 kB
JavaScript
/*funcunit@3.6.3#browser/init*/
define('funcunit/browser/init', [
'require',
'exports',
'module',
'funcunit/browser/jquery'
], function (require, exports, module) {
var jQuery = require('funcunit/browser/jquery');
var FuncUnit = window.FuncUnit || {};
jQuery.sub = function () {
function jQuerySub(selector, context) {
return new jQuerySub.fn.init(selector, context);
}
jQuery.extend(true, jQuerySub, this);
jQuerySub.superclass = this;
jQuerySub.fn = jQuerySub.prototype = this();
jQuerySub.fn.constructor = jQuerySub;
jQuerySub.sub = this.sub;
jQuerySub.fn.init = function init(selector, context) {
if (context && context instanceof jQuery && !(context instanceof jQuerySub)) {
context = jQuerySub(context);
}
return jQuery.fn.init.call(this, selector, context, rootjQuerySub);
};
jQuerySub.fn.init.prototype = jQuerySub.fn;
var rootjQuerySub = jQuerySub(document);
return jQuerySub;
};
FuncUnit.jQuery = jQuery;
module.exports = FuncUnit;
});