diff --git a/test/async-stub.html b/test/async-stub.html new file mode 100644 index 0000000..ca583e1 --- /dev/null +++ b/test/async-stub.html @@ -0,0 +1,206 @@ + + +
+ + + +SurfaceSetConsent call.?tagDelay=3000 (slow tag on a fast site),
+ ?tagDelay=8000 (interact before the tag exists),
+ ?noTag=1 (tag never loads — page must stay functional,
+ forms simply don't open).
+ false (add &surfaceDebug=true to enable)
+ Tag script: not injected yet
Calls queued before tag load: ?
Tag drained the queue: waiting…
Stub references re-pointed at real embeds: waiting…
Surface iframes in DOM (watch pre-loading kick in after page load): 0
Embeds after drain: —
Constructed pre-load. With ?tagDelay=8000: the trigger button is
+ inert until the tag arrives (expected — no handler exists yet), but the kept
+ stub reference queues the call and the slideover opens right after the drain.
Constructed pre-load with prefillData. Open it and check the
+ pre-filled answer; the STORE_UPDATE payload in the log carries it as
+ questionIds. Override with
+ ?prefillQid=<questionId>&prefillVal=<value>
+ to target a real question on your form.
Constructed pre-load as an input-trigger embed. Enter an email
+ and submit — the form opens with the email pre-filled.
Constructed pre-load. The form must appear below on its own once the tag + drains the queue — no interaction needed.
+ +All embeds above use the default preload: "true" (page load +
+ idle). Without clicking anything, the iframe count in the status panel
+ should rise shortly after the tag loads — that is pre-loading working
+ through the async path.
Customer-embedded iframe with a slow (?tagDelay=3000) or blocked (?noTag=1) tag.