events.md

Documentation Index

Fetch the complete documentation index at: https://filecheck.io/docs/llms.txt Use this file to discover all available pages before exploring further.

Events

Subscribe to the Element lifecycle: ready, status, facts, ui, error, proof, scene, and destroy.

Subscribe with intake.on(event, handler). It returns an unsubscribe function.

Event Fires when Payload
ready The iframe is ready { ui } (resolved UI)
status Job state changes IntakeStatusPayload
facts File measurements update IntakeFacts
ui UI changes after update() the new UI
error A recoverable iframe error { code, message }
proof A soft-proof is ready ProofPayload
scene The job's 3D Proof is ready for the product gallery, or no longer is { viewer } (null when no longer ready)
destroy The element unmounts —

Gate on status

The one event you must handle. Gate your submit button on canProceed:

intake.on('status', ({ canProceed, jobId }) => {
  submitBtn.disabled = !canProceed;
  hiddenJobIdInput.value = jobId ?? '';
});

Drive custom logic with facts

facts fires alongside status with file measurements (dimensions in millimetres). Use it to drive a price preview or your own controls:

intake.on('facts', (facts) => {
  console.log(facts.aggregate.pageCount, facts.aggregate.width);
});

See Facts for the full shape, or Connectors to map facts onto page controls without custom code.

This documentation is built and hosted on Mintlify, a developer documentation platform.