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 __ 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?

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 __proto___ or in the future , Can stop supporting it.

I searched this hard when my code stopped working when used in HTML applications.

must correctly call (in ES5) Object.create (Constructor.prototype, obj) ()

Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -