javascript - Assign __proto__ to an interface to turn it into an object - clever or dangerous? -
When using a post message () to copy data from / from the webmaster, you can post that item Which is a class. But on the far side, the received object is just data (i.e. the interface, no class).
has suggested that the correct I am not asking about the opinion (a big no-number), I am asking that there are some technical problems that can cut me back. Some browsers may not support patching I searched this hard when my code stopped working when used in HTML applications. must correctly call (in ES5) __ proto __ turn it back on in the class on the receiving side of the object. But this solid & amp; Is safe or is it asking for trouble?
__proto___ or in the future , Can stop supporting it.
Object.create (Constructor.prototype, obj) ()
Comments
Post a Comment