W3C home > Mailing lists > Public > public-webapi@w3.org > April 2006

XHR constructor example

From: Daniel Schierbeck <daniel.schierbeck@gmail.com>
Date: Sat, 15 Apr 2006 19:41:41 +0200
Message-ID: <44413055.3060701@gmail.com>
To: Public Web API <public-webapi@w3.org>

The current example[1] of an XMLHttpRequest constructor,
  var r = new XMLHttpRequest();
is fine and all, but the variable name `r' strikes me as a bit odd.
I know it's not the job of the W3C to teach best programming practices,
but at least using somewhat descriptive variable names in examples would
not be out of order. This is better:
  var request = new XMLHttpRequest();

[1] http://www.w3.org/TR/2006/WD-XMLHttpRequest-20060405/#xmlhttprequest


Cheers,
Daniel Schierbeck
Received on Saturday, 15 April 2006 17:41:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:54 GMT