Re: [heycam/webidl] Adding slots [initial braindump] (#258)

Prior discussion: https://www.w3.org/Bugs/Public/show_bug.cgi?id=27354.

Given that we don't have a unified type system we should probably not block slots on that. So an initial version would not have explicit types (all done through prose).

It does seem good to define slots for an interface in a formalized way and have syntax for getting at them. We'll need to allow for mixins/partial too. Having a way to address "this" should probably come first. Being able to do "this.[[slot]]" would be enormously helpful. I suspect defining slots in IDL would be the most natural as you need to know about them when putting together an object.

If we want to go for brevity, I think there's something to be looked at around IDL attributes. While not all of them would need a backing slot (e.g., `innerHTML` sure doesn't except perhaps for optimization purposes which we don't need to define), a lot of them do. The problem with that is of course that attributes have a type, which we'd need to ignore for the slot and that an attribute line on its own is already getting quite verbose with the various extended attributes we've been adding.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/258#issuecomment-267913515

Received on Monday, 19 December 2016 09:00:16 UTC