This is one thing that came to my mind a couple months ago, but there are a
> number of ways to resolve this problem, such as:
>
>     function mixin(a, b) {
>         for (let name of Object.getOwnPropertyNames(b)) {
>             let desc = Object.getOwnPropertyDescriptor(b, name);
>             if (typeof desc.value == 'function')
>                 desc.value = desc.value.bind(b);
>             Object.defineProperty(a, name, desc);
>         }
>     }
>
>
In order to satisfy security guarantees, properties which are keys on
private symbols are not returned by getOwnPropertyNames.

{ Kevin }
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to