[][src]Function div::init_ex

pub fn init_ex(
    id: Option<&str>,
    pos: (u32, u32),
    size: Option<(u32, u32)>
) -> Result<(), DivError>

Extended initialization function. Mounts a global div as a child of the HTML element with the defined ID. The specified dimensions restrict the area in which divs are visible.

Example

let width = 1280;
let height = 720;
div::init_ex(Some("div-root"), (0, 0), Some((width, height)));