Violations of internal method invariants?

Tom Van Cutsem at
Wed Jul 30 22:53:39 PDT 2014

Hi Boris,

It seems you're right (reproduced on Chrome and Safari). These examples
clearly violate all the invariants related to non-configurable properties.

If I understand correctly, the form DOM element's named input properties
'shadow' the actual JS properties defined on the DOM object. Even if the
DOM object defines a non-configurable "foo" property, adding an input
element with the name "foo" will shadow the non-configurable property with
a configurable one (and removing the input element again reveals the old
non-configurable JS property).

This seems bad. I'm not a DOM expert, but is it essential that the form
elements have two distinct namespaces (the namespace for named input
elements and for regular JS properties), or is this just a side-effect of
how they happen to be implemented?


2014-07-28 18:04 GMT+02:00 Boris Zbarsky <bzbarsky at>:

> I was trying to determine what browsers do with named properties on <form>
> elements, and I'm getting some rather strange results.
> Consider and
> Is it just me, or do Chrome and IE violate the internal method invariants
> on the first of those, and all three of Chrome, IE, Safari violate them on
> the second one?
> -Boris
> _______________________________________________
> es-discuss mailing list
> es-discuss at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list