added jsonp transport

This commit is contained in:
Alec Embke 2014-08-20 14:16:16 -07:00
parent f64d861552
commit daf8160bf2
4 changed files with 3261 additions and 17 deletions

View file

@ -70,6 +70,23 @@ mock.window = new function() {
this.childNodes.splice(index, 1)
child.parentNode = null
}
window.document.getElementsByTagName = function(name){
name = name.toLowerCase();
var out = [];
var traverse = function(node){
if(node.childNodes && node.childNodes.length > 0){
node.childNodes.forEach(function(curr){
if(curr.nodeName.toLowerCase() === name)
out.push(curr);
traverse(curr);
});
}
};
traverse(window.document);
return out;
}
window.scrollTo = function() {}
window.cancelAnimationFrame = function() {}
window.requestAnimationFrame = function(callback) {