[whatwg] Thoughts on HTML 5

Giovanni Campagna scampa.giovanni at gmail.com
Mon Dec 22 09:00:37 PST 2008


2008/12/21 Garrett Smith <dhtmlkitchen at gmail.com>

>
> Styling is done in css.


Dynamic styling is currently done with the style property of HTMLElement.
This is currently implemented in DOM2HTML and HTML5, but I once read they're
going to write a separate CSS-Object Model, whose spec is not ready yet, but
it is mentioned in the CSS current work.

I don't have time to go into the all the problems with CSSOM here.
> Shortcomings of the CSSOM 'views' module were discussed on www-style.
> 'VIews' is not the only CSSOM module that has problems.
>
Most of CSS is already implemented (like HTML, they're just standarizing
what browser already do)


> > you don't need collection either: just use appropriate DOMNodeLists,
> while
> > for DOMStringMap you may use binding specific features (all Object are
> hash
> > maps in ECMAScript3): it works this way even in HTML5
>
> Where are you getting this information?
>
What information?
a) DOMNodeList are collection of ordered Nodes --> see DOM3Core for
definition - if you want only Element Nodes see the Element Traversal
specification by the WebApps WG
b) ECMAScript Object are implemented as associative arrays (hash map /
binary tree) --> see Mozilla Developer Center: it is only about Firefox, but
I think all browser behave like this since they must reference arbitrary
properties that are not known at compile time (if they compile)
c) DOMStringMap is defined to be like ECMAScript Object --> look at its IDL:
it has no members, no properties, no methods

> but scripts use certain features only on their own browsing context, so
> that
> > may be moved from that to global scope, removing the whole window object
> > from scope (for current javascript you can write
> > window.window.window.window.window... and get the same as nothing)
>
The closest definition to 'nothing' would be the value undefined. I do
> not know of a browser where - window.window.window === undefined is
> true by default. I get window.


a) undefined != undefined is true in ECMAScript
b) i didn't mean undefined, i mean literally nothing, eg this script
window.window.window.window.window.window.window.alert("hello, world");
is exactly the same as
alert("hello, world");


> The closes thing we got to an example of invalid html is TJ post about
> jquery validation plugin. If you click throuh, there is an demo using
> a minlength custom attribute. The attribute may have the effect the
> author wanted it to have in a set of browses he is concerned about.
> That "effect" and the "set of browsers" could be more clearly
> demonstrated in an example that shows only that, as well as edge cases
> where results may vary.

I don't see your point...


> If you can't define clearly what can be reasonably expected of a piece
> of (invalid) code, then nothing can be reasonably expected of it. It's
> not a good to write code that can't have an expected outcome.
>
HTML5 is here to define what browser must and must not do with de-facto
standards (called DOM Level 0, but also features that once were
browser-specific like embed)
Instead what I'm asking is only for the developer point of view.


Giovanni
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20081222/acbbb40e/attachment-0001.htm>


More information about the whatwg mailing list