[Webkit-unassigned] [Bug 36089] Web SQL: SQLResultSetRowList does not support indexing of rows
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Sep 19 22:30:39 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=36089
--- Comment #3 from Matt Bishop <matt at re-entry.ca> 2010-09-19 22:30:39 PST ---
Here is the code from the attached test case:
db.readTransaction(function (t) {
t.executeSql('SELECT COUNT(*) AS c FROM docids', [], function (t, r) {
span.textContent = r.rows[0].c;
}, function (t, e) {
// couldn't read database
span.textContent = '(unknown: ' + e.message + ')';
});
});
The correct syntax is:
span.textContent = r.rows.item(0).c;
SQLResultSetRowList has two methods : item() and length. For a given item(), that "...object's indices of the supported indexed properties are the numbers..." This sentence does not mean that rows is an array, but rather a list of rows with an item() accessor method. The specific row object that is returned by item() does indeed behave like an array
If you really feel this is still a bug, please provide another browser that works the way that is described in this bug report.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list