Stubbing our #150

git-svn-id: https://beef.googlecode.com/svn/trunk@574 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
scotty.b.brown
2010-11-24 10:03:24 +00:00
parent 64c37c9bec
commit 7a4a84d7ef

View File

@@ -62,6 +62,31 @@ beef.dom = {
return iframe;
},
/**
* @params: {String} url: target url which is loaded in the iframe.
* @params: {String} method: whether to use a GET or POST HTTP method.
* @params: {Hash} params: list of params that will be sent in request.
* @params: {Boolean} hidden: whether to make the iframe hidden.
* @params: {Boolean} remove: whether to remove the iframe from the dom once it is loaded.
* @return: {String} result: success, failure or timeout
*/
iframeCreate: function(url, method, params, hidden, remove){
var iframe = this.createElement('iframe', {
width: '1px',
height: '1px',
style: 'visibility:hidden;',
location: url
});
document.body.appendChild(iframe);
var result = "success";
return result;
},
/**
* Get the location of the current page.
* @return: the location.