Re: [w3c/webcomponents] Returning a Proxy from a Custom Element constructor (#857)

> you can achieve run-multiple-real-constructors-with-one-instance without using proxies if it’s okay to require those constructors to extend a special meta class. But I didn’t dig in too far, so I’m not sure what other stuff proxies may be facilitating for this lib.

One thing that I want to facilitate with the lib is importing classes from anywhere and extending from them, without needing to modify their source code, f.e.

```js
import {multiple} from "lowclass"
import {EventEmitter} from "events" // does not extend special meta class
import {Something} from "something" // does not extend special meta class

class Foo {...}

class Bar extends multiple(Foo, EventEmitter, Something) {...}
```

With class-factory mixins, or with constructors having to extend a meta class, there would be no way to import an arbitrary set of classes from anywhere and extend from all of them because they aren't wrapped in a function per don't extend from the meta class (or extend from some other class).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/857#issuecomment-706963486

Received on Monday, 12 October 2020 08:23:00 UTC