diff options
author | Andrew Dolgov <[email protected]> | 2011-03-04 19:02:28 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2011-03-04 19:02:59 +0300 |
commit | a089699c8915636ba4f158d77dba9b012bc93208 (patch) | |
tree | b2d7d051f1f55d44a6be07d3ee137e5a7ccfcefb /lib/dojo/data/api/Request.js | |
parent | cfad9259a6feacfa8194b1312770ae6db1ecce50 (diff) |
build custom layer of Dojo to speed up loading of tt-rss (refs #293)
Diffstat (limited to 'lib/dojo/data/api/Request.js')
-rw-r--r-- | lib/dojo/data/api/Request.js | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/lib/dojo/data/api/Request.js b/lib/dojo/data/api/Request.js index 2d8e0e044..d613c7b11 100644 --- a/lib/dojo/data/api/Request.js +++ b/lib/dojo/data/api/Request.js @@ -5,10 +5,35 @@ */ -if(!dojo._hasResource["dojo.data.api.Request"]){ -dojo._hasResource["dojo.data.api.Request"]=true; +if(!dojo._hasResource["dojo.data.api.Request"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. +dojo._hasResource["dojo.data.api.Request"] = true; dojo.provide("dojo.data.api.Request"); -dojo.declare("dojo.data.api.Request",null,{abort:function(){ -throw new Error("Unimplemented API: dojo.data.api.Request.abort"); -}}); + +dojo.declare("dojo.data.api.Request", null, { + // summary: + // This class defines out the semantics of what a 'Request' object looks like + // when returned from a fetch() method. In general, a request object is + // nothing more than the original keywordArgs from fetch with an abort function + // attached to it to allow users to abort a particular request if they so choose. + // No other functions are required on a general Request object return. That does not + // inhibit other store implementations from adding extentions to it, of course. + // + // This is an abstract API that data provider implementations conform to. + // This file defines methods signatures and intentionally leaves all the + // methods unimplemented. + // + // For more details on fetch, see dojo.data.api.Read.fetch(). + + abort: function(){ + // summary: + // This function is a hook point for stores to provide as a way for + // a fetch to be halted mid-processing. + // description: + // This function is a hook point for stores to provide as a way for + // a fetch to be halted mid-processing. For more details on the fetch() api, + // please see dojo.data.api.Read.fetch(). + throw new Error('Unimplemented API: dojo.data.api.Request.abort'); + } +}); + } |