Created
August 28, 2012 16:10
-
-
Save ychaouche/3499609 to your computer and use it in GitHub Desktop.
This file contains 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
function YRSSReader(){ // Yahoo! RSS Reader | |
this.feed_url = "http://rss.news.yahoo.com/rss/topstories"; | |
this.items = []; | |
this.callback = AjxCallback(this,this.simpleResponseHandler); | |
} | |
YRSSReader.prototype = new ZmZimletBase(); | |
YRSSReader.prototype.constructor = YRSSReader; | |
// Handle de la réponse à la requête XHR en cas de succès | |
// Version simple (appel de this.sendRequest) | |
YRSSReader.prototype.simpleResponseHandler = function (){ | |
console.debug("result received"); | |
}; | |
YRSSReader.prototype.getFeed = function () { | |
// sendRequest(requestStr, serverURL, requestHeaders, callback, useGet, passErrors) | |
console.debug("about to send request"); | |
this.sendRequest("",this.feed_url,null,AjxCallback(this,this.simpleResponseHandler)); | |
console.debug("request sent"); | |
} | |
reader = new YRSSReader(); | |
reader.getFeed(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment