Type Checking?

Garrett Smith dhtmlkitchen at gmail.com
Wed Oct 10 15:53:21 PDT 2007

Typechecking is a problem.

typeof is limited and allows host objects to return anything. The
problem is that some host objects return "function", for example, a
NodeList in Safari. This is perfectly legal, according to the spec.

Checking instanceof between frames doesn't work.

var i = document.getElementsByTagName("iframe")[0].contentWindow;

i.someFunction instanceof Function; // false.

How is type checking addressed in ES4?


Programming is a collaborative art.

More information about the Es4-discuss mailing list