- From: Timothy Hatcher <timothy@apple.com>
- Date: Thu, 10 Apr 2008 09:34:27 -0700
Converting an object to a string has a very defined path in JavaScript, toString is called. Perhaps the spec should mention toString. Marking the query as bogus seems wrong, since the JavaScript language is very lenient about types and implicit type conversions when needed. Implicit conversion to strings is what any proficient JavaScript author would expect to happen. I don't see any reason to make the storage spec behave differently. On Apr 10, 2008, at 4:32 AM, Dimitri Glazkov wrote: > In other words, if the type of the argument is not null, string, > double, or int, the argument is implicitly converted to to string. > > As an alternative, I would like to present a slightly different > approach: if, during step 3 of the executeSql algorithm > (http://www.whatwg.org/specs/web-apps/current-work/multipage/section-sql.html#executing > ), > an argument is found to be unpalatable for the underlying database > implementation, the statement is marked bogus. > > Though a bit more stringent than the implicit conversion, this > approach explicitly prevents any subtle coercion bugs and will > probably lead to more debuggable code. ? Timothy Hatcher -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20080410/01742837/attachment.htm>
Received on Thursday, 10 April 2008 09:34:27 UTC