Created
November 22, 2013 23:47
-
-
Save marcmartino/7608834 to your computer and use it in GitHub Desktop.
bleh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var nike = (function () { | |
var eventChain = [], | |
thisJqEle; | |
return { | |
findElement: function (elementSelector, asyncTimeout) { | |
//async should be the lenght of time to wait when looking async for the ele | |
//sync only now | |
eventChain.push(function (elementSelector, asyncTimeout) { | |
return function () { | |
var foundEle; | |
if (asyncTimeout) { | |
} else { | |
foundEle = $(elementSelector); | |
if (foundEle.length > 0) { | |
thisJqEle = foundEle; | |
console.log("found element: " + elementSelector); | |
} else { | |
console.error("no element found: " + elementSelector); | |
} | |
thisNike.next(); | |
} | |
}; | |
}(elementSelector, asyncTimeout)); | |
return this; | |
}, | |
click: function () { | |
}, | |
submitForm: function () { | |
}, | |
wait: function () { | |
}, | |
next: function () { | |
// | |
} | |
}; | |
} ()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment