HTTP DOM: request.use? Usage?
I'm looking at the following code block in javascript:
var request = new Request();
if(request.Use()) // What exactly does this do?
{
// ...do stuff
}
else
{
// no ajax support?
}
I've never seen anyone invoke the request.Use() method.
My Question:
- What exactly does request.Use() check?
- Does it in fact check for AJAX support?
- Can anyone redirect me to an online API reference?
EDIT: Thanks for the helpful feedback.
I see both prototype and scriptaculous includes.Has anyone seen request.Use() in eithe开发者_如何学JAVAr prototype or scriptaculous?
No, I've never seen Request.Use
in Prototype or script.aculo.us. (I know Prototype very well and it's definitely not that. Scripty [as it's sometimes known] I know less well but I'm pretty sure that's not scripty, either. [Edit It's not, just did a quick search through the scripty source.])
You can find Prototype docs here (old docs) and here (new docs, not entirely complete) and scripty docs here.
If the page is using Prototype, search (case sensitive) for the strings function Request
, Request =
, and Request:
in the source of the page itself and any JavaScript files it refrences to see if someone's defined a wrapper, which it seems likely they have. (If you can use regex to allow unlimited whitespace around those operators, all the better.)
精彩评论