w3c / uievents

UI Events
https://w3c.github.io/uievents/
Other
147 stars 51 forks source link

Mark up IDL attributes properly #110

Closed domenic closed 7 years ago

domenic commented 8 years ago

Right now there is no connected between the definition of e.g. MouseEvent's ctrlKey, and the IDL. This requires some Bikeshed tricks: instead of

<dt>MouseEvent . ctrlKey</dt>

write

<dt><dfn attribute for="MouseEvent">ctrlKey</dfn></dt>

(Also please don't use the InterfaceName.attributeName notation.)

This makes it easier for other specs to link to you, and will avoid the accidental linking to CSSOM that is done for screenX and friends.

garykac commented 7 years ago

What's the correct way to tag functions (like getModifierState(keyArg))?

I tried

<dl dfn-for="MouseEvent">
  ...
  <dt><dfn function>getModifierState(keyArg)</dfn></dt>
  ...
</dl>

But it didn't link to the IDL like the <dfn attribute>s did.

domenic commented 7 years ago

Based on https://tabatkins.github.io/bikeshed/#dfn-types it's <dfn method>