DioxusLabs / dioxus

Fullstack app framework for web, desktop, mobile, and more.
https://dioxuslabs.com
Apache License 2.0
20.47k stars 786 forks source link

More imperative methods (like volume) on MountedData (which should just be NodeRef) #191

Open jkelleyrtp opened 2 years ago

jkelleyrtp commented 2 years ago

Specific Demand

There's a handful of DOM properties that can only be managed imperatively. Things like the document title and the volume setting on audio elements can only be controlled imperatively, meaning you can't modify these elements in a Desktop app.

Certain things like WebGL don't make sense to provide a bespoke API over (well, maybe something like react-three-fiber), but very simple/basic things like audio tags should be easy to control declaratively.

Implement Suggestion

Audio Tags

Video Tags

cc @autarch for ideas on more DOM APIs

mpfaff commented 2 years ago

I'd like a way to easily call HTMLElement.focus().

ealmloff commented 1 year ago

I'd like a way to easily call HTMLElement.focus().

You can now do this with the onmounted event!