W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2008

[selectors-api] Typo in Example

From: Gavin Kistner <gavin@phrogz.net>
Date: Tue, 18 Nov 2008 20:19:59 -0700
Message-Id: <9C06E436-9062-46FE-A8CD-E7A9CD5BE519@phrogz.net>
To: public-webapps@w3.org

The Selectors API document, section 8, has this example code:
   var div = document.getElementById("bar");
   var p = bar.querySelector("body p");

I assume that is supposed to be either...
   var div = document.getElementById("bar");
   var p = div.querySelector("body p");
...or...
   var bar = document.getElementById("bar");
   var p = bar.querySelector("body p");
Received on Wednesday, 19 November 2008 03:20:35 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:28 GMT