Event

render

Dispatched after the doodle has rendered, on the first render and after every update.

Syntax

  • doodle.addEventListener('render', handler)

The event bubbles and crosses shadow boundaries. It is dispatched asynchronously, right after the styles are in place, so the rendered size can be measured in the handler. Images produced by @doodle, @shaders and @pattern may still be loading.

Examples

const doodle = document.querySelector('css-doodle');

doodle.addEventListener('render', () => {
  console.log('rendered with seed', doodle.seed);
});

See also