section C.2.5 (coercion to string)

On further reflection, it turns out that the phrase about coercion to string in section C.2.5 is obsolete and can be removed ("The Processor may convert the expression result to a string in contexts where a string is expected").  This was intended to allow the processor to serialize objects with <send> etc. (so if the expr of a <param> evaluated to an ECMAScript object, the processor could stringify it rather than raising an error.)  We now have a separate section on serialization, so we no longer need this sentence (and it was phrased too vaguely anyway).



On a somewhat related issue, I think that we should add prose to the description <data> element (specifically inline data or data provided by 'src') and to the description of _event.data, saying that if the source of the data provides a hint as to its type, the processor should try to use that type.  Right now the prose in both places says:  If it looks like JSON, ... otherwise if it looks like XML, ... otherwise treat it as a string.  I think that it would be more flexible to put a sentence before this allowing for a hint (for example content-type in data returned via HTTP) to take precedence, and leave the existing prose as a description of the default behavior in cases where no hint is provided.



-    Jim

Received on Monday, 15 April 2013 14:10:56 UTC