mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[jquery] add root alias to $(..).findTestSubject
This commit is contained in:
parent
79968f9e31
commit
657697aa68
1 changed files with 6 additions and 1 deletions
7
src/ui/public/jquery/findTestSubject.js
vendored
7
src/ui/public/jquery/findTestSubject.js
vendored
|
@ -1,6 +1,6 @@
|
|||
module.exports = function bindToJquery($) {
|
||||
|
||||
$.fn.findTestSubject = function (/* ...subjectSelectors */) {
|
||||
function findTestSubject(/* ...subjectSelectors */) {
|
||||
var subjectSelectors = [].slice.apply(arguments);
|
||||
var $els = $();
|
||||
var $context = this;
|
||||
|
@ -16,4 +16,9 @@ module.exports = function bindToJquery($) {
|
|||
return $els;
|
||||
};
|
||||
|
||||
$.fn.findTestSubject = findTestSubject;
|
||||
$.findTestSubject = function () {
|
||||
return findTestSubject.apply($(document.body), arguments);
|
||||
};
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue