-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
What is the issue with the HTML Standard?
To match how newer IDREF content attributes have an IDL reflection counterpart, I propose we add the missing properties for the older attributes.
I'm less convinced of the utility of some of these (e.g. headers) but potentially should be included for API completeness.
for attribute
We should add a new forElement property to the relevant interfaces.I've chosen forElement rather than htmlForElement as the existing properties name is a quirk of history and I feel it's better to keep a simpler name at the expense of not aligning with that property name.
Currently we have htmlFor which takes an ID (cannot do cross-root association unlike the modern ones), or we have control which is readonly.
Given we have the control property already I'm proposing this just being a pure reflection.
partial interface HTMLLabelElement {
[CEReactions, Reflect="for"] attribute Element? forElement;
};
partial interface HTMLOutputElement {
[CEReactions, Reflect="for"] attribute FrozenArray<Element>? forElements;
};list attribute
We should add a new listElement property to the relevant interfaces.Currently we have no writable property you have to use set attribute with an ID, or we have list which is readonly and only returns valid list associations.
Given we have list already I propose this is pure reflection.
partial interface HTMLInputElement {
[CEReactions, Reflect="list"] attribute Element? listElement;
};form attribute
We should add a new formElement property to the relevant interfaces.Currently we have no writable property you have to use set attribute with an ID, or we have form which is readonly and only returns valid form associations.
Given we have form already I propose this is pure reflection.
interface mixin FormElementThingy {
[CEReactions, Reflect="form"] attribute Element? formElement;
};
HTMLInputElement includes FormElementThingy;
HTMLButtonElement includes FormElementThingy;
HTMLSelectElement includes FormElementThingy;
HTMLOptionElement includes FormElementThingy;
HTMLTextAreaElement includes FormElementThingy;
HTMLOutputElement includes FormElementThingy;
HTMLFIeldsetElement includes FormElementThingy;
HTMLLegendElement includes FormElementThingy;
ElementInternals includes FormElementThingy; // Not sure if this is correct or not?headers attribute
We should add a new headerElements property to the relevant interfaces.Currently we have the headers property but that just reflects the raw string of the attribute. So in a well formed case you can give it the list of idrefs but that won't allow the cross-root usage.
partial interface HTMLTableCellElement {
[CEReactions, Reflect="headers"] attribute FrozenArray<Element>? headerElements;
};