w3c / css-houdini-drafts

Mirror of https://hg.css-houdini.org/drafts
https://drafts.css-houdini.org/
Other
1.84k stars 141 forks source link

CSSURLImageValue url internal slot links to url IDL attribute #711

Open annevk opened 6 years ago

annevk commented 6 years ago

It seems the internal slot is not actually defined as I suspect all internal slots would use [[ and ]] as syntax delimiters.

tabatkins commented 6 years ago

Right, per https://github.com/heycam/webidl/issues/258#issuecomment-285157433 I'm just implicitly pretending that every attribute auto-defines a backing slot, so I can manipulate that instead of incorrectly trying to do something with the public property. Until IDL decides one way or the other on that topic, I don't think I can reasonably have Bikeshed auto-define [[foo]] slots for everything, and I'm definitely not going to manually define slots for every single attribute on every single interface (along with manual definitions of the fact that the public property reflects the slot, etc) - it would just be horrifying to read/write.

(This issue confused me quite a bit, as I use this convention thruout the entire spec; I thought something weird was going on in this particular spot for you to point it out.)

annevk commented 6 years ago

I haven't read everything in detail, but I think this is rather confusing to read.

tabatkins commented 6 years ago

Then let's get the slot proposal pushed forward. I'm not willing to manually define mirror-slots of every single attribute and manually write the forwarding logic (and more importantly, there is no way I'm inflicting that burden on every other spec writer; it's already bad enough with people implicitly referring to the public attribute by accident).

I can put in something about this in the intro, tho that won't actually help your issue since nobody ever reads the intro boilerplate anyway.

annevk commented 6 years ago

That'd be https://github.com/heycam/webidl/issues/258. I guess we can make this depend on that. Agreed that defining conventions doesn't really help much.