Skip to main content

Module renderer

Module renderer 

Source
Expand description

Application-facing renderer type for browser/WASM targets.

HTMLRenderer is the main entry point: wire it into CotisApp with a layout manager and render-list pipe, then drive frames through AsyncRenderApp::compute_frame_async.

Each frame:

  1. CotisRendererAsync::draw_frame awaits the JS waitForNextFrame helper.
  2. Render commands (types implementing HTMLDrawable) are drawn via draw_html_render_commands.

Cotis context traits (CotisWindowContext, CotisFrameContext, text measuring, etc.) are implemented in crate::cotis_traits.

Custom DOM hosts and form reading: crate::custom_data and HTMLRenderer::get_custom_element_html / HTMLRenderer::get_custom_element_properties.

Image URLs: crate::images.

Structs§

HTMLRenderer
Async HTML/CSS renderer for Cotis applications running in the browser.

Type Aliases§

LoopRoutine
Reserved type alias for a synchronous loop callback (currently unused).
MeasureFunType
Reserved type alias for a text-measuring callback (currently unused).