Test how forms are embedded: inline, iframe, dynamic injection, Shadow DOM
Forms can be embedded in many ways: directly in the DOM, inside iframes (same or cross-origin), injected dynamically (like Marketo/HubSpot), or inside Shadow DOM. Each method presents unique challenges for identity capture.
Basic form in page DOM. This is the baseline test that should always work.
Form loaded in same-origin iframe. SDK in parent should be able to detect.
Simulated cross-origin iframe using srcdoc. Form submits inside iframe.
Empty div, JavaScript injects form after delay. Simulates MktoForms2.loadForm().
Click "Load Form" to inject form dynamically
Form inside Shadow DOM. Tests if submit events bubble through shadow boundary.
Button click loads form HTML via fetch, injects into page.
Click to fetch and inject form HTML
Form defined in <template> element, cloned and inserted on button click.
Click to clone template form