xilem icon indicating copy to clipboard operation
xilem copied to clipboard

xilem_web: Should helper functions for known attributes be added to elements?

Open casey opened this issue 1 year ago • 1 comments

I noticed that HtmlButtonElement has a disabled helper method for setting the disabled state, but that, for example, HtmlIFrameElement doesn't have a src helper method for setting the <iframe> src attribute. Is it desired to have such helper methods? If so, I'd be happy to submit a PR.

casey avatar Jul 28 '24 23:07 casey

Yeah that's actually the plan, and I'm happy for PRs implementing this, e.g. the HtmlImageElement does have src already, currently just wrapping Attr is fine. Ideally this should access the DOM attributes directly of the underlying element, but I have concerns regarding the resulting binary size with the code that's necessary for this (which is why there's a commented out feature gate above those traits).

Philipp-M avatar Jul 29 '24 00:07 Philipp-M