Re: RfC: WebApps Testing Process

On Mon, Apr 4, 2011 at 7:12 PM, Garrett Smith <dhtmlkitchen@gmail.com> wrote:
> I looked but I didn't see it where the spec says there's a global `Node`.

The Node interface is defined here:

http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-node

Interfaces are as defined by WebIDL, which specifies an ECMAScript binding:

"For every interface that is not declared with the [NoInterfaceObject]
extended attribute, a corresponding property must exist on the
interface’s relevant namespace object."
http://dev.w3.org/2006/webapi/WebIDL/#es-interfaces

"""
The relevant namespace object for a module, interface or exception A
is determined as follows:

* If A has an enclosing module and that module has a namespace object,
than that namespace object is A’s relevant namespace object.
* Otherwise, A’s relevant namespace object is the ECMAScript global object.
"""
http://dev.w3.org/2006/webapi/WebIDL/#dfn-relevant-namespace-object

There is no enclosing module given for the Node interface in Web DOM,
so it's on the global object.

> To avoid the problems of generality, long functions, and typechecking.

What's wrong with generality, long functions, or typechecking?  (Long
functions aren't an issue at all, since it could always be broken up
into subfunctions.)

> All of these things open doors for quirks and gotchas,.

Like?

> Host object typechecking in particular is doomed to fail.

In what ways?

> We discussed this for
> years on c.l.js and with many examples from the popular libraries like
> jQuery, Dojo, and Prototype.js.

And what are the reasons for your conclusions?

> If the problems with long functions, generalized functions, overloaded
> typechecking functions are not understood then refactoring the code to
> not do thost things won't seem very worthwhile.

That about sums it up, yes.  I think you need to clarify what problems
you have with these things.  Keep in mind that we're *not* aiming to
make a fully general test harness, we're aiming to make a test harness
for running tests for browser-targeted standards, which are expected
to mostly be maintained in W3C test suites.

> Is the HTML WG doing something with the javascript? Seems kind of strange to me.

A huge part of the HTML standard defines JavaScript APIs.  Look at,
for instance, the IDL for media elements:

http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#media-elements

There are entire chapters of the standard devoted exclusively to
JavaScript, like "Web application APIs".

Received on Wednesday, 6 April 2011 22:27:27 UTC