On Tue, Jun 30, 2015 at 6:41 PM, Kevin Smith <zenpars...@gmail.com> wrote: > Changes the prototype dynamically? We're generally moving away from such > shenanigans. > > That would indeed interact poorly with some of the designs for private state > that we've been entertaining. In such a scheme private state "slots" are > allocated when the object is created. But in your use case you wouldn't > know what slots to allocate until after you've created the object. And then > it's too late.
Right, my personal preference is to just use constructors. That however has two drawbacks: 1) Leaves upgrading nodes up to the developer. Or requires them to load script synchronously, blocking the parser. Neither is particularly great. 2) Would allow JavaScript to run while cloning nodes (needed for various editing operations and printing in some browsers) would be a pain as the C++ algorithms are not prepared for it. Very much unclear if that's feasible within any reasonable amount of time. -- https://annevankesteren.nl/ _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss