W3C home > Mailing lists > Public > www-style@w3.org > January 2010

Re: Text selector [was Re: breaking overflow]

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 04 Jan 2010 11:01:02 -0500
Message-ID: <4B4210BE.7040103@mit.edu>
To: James Hopkins <james@idreamincode.co.uk>
CC: www-style list <www-style@w3.org>
On 1/4/10 7:15 AM, James Hopkins wrote:
>> <script>
>> document.body.appendChild(document.createTextNode("ba"));
>> document.body.appendChild(document.createTextNode("r"));
>> </script>
> The authors intention was to create two separate textnodes, thus they
> should be treated separately.

How do you know that was the author's intention?  Maybe the author just 
ran a library "insertText('bar')" function and the library inserts one 
character at a time for whatever reason?

In any case, the browser has no idea of "intention"; all it knows is the 
resulting DOM.

>> <!DOCTYPE html>
>> <body>bar
>> with an HTTP packet boundary between the 'a' and the 'r'.
> I'm unsure as to what this is :)

I'm not sure what you're unsure about, exactly....  Can you clarify?

Received on Monday, 4 January 2010 16:01:54 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:42 UTC