Closed kzar closed 6 months ago
Apstag calls are queued onto the window.apstag._Q array and are then called when the Apstag script is ready. The shim expects each queued call to be an array containing the API method name prefix and arguments, e.g.
window.apstag._Q
["f", {slots: [...], timeout: 3000}, () => { ... }]
I noticed in practice however, some calls are queued differently, with a queued call looking something like this instead:
[["f", Arguments([{slots: [...], timeout: 3000}, () => { ... }])]]
Since the original script handles that, the shim needs to as well. Let's try our best here, without changing too much and risking further breakage.
Apstag calls are queued onto the
window.apstag._Q
array and are then called when the Apstag script is ready. The shim expects each queued call to be an array containing the API method name prefix and arguments, e.g.I noticed in practice however, some calls are queued differently, with a queued call looking something like this instead:
Since the original script handles that, the shim needs to as well. Let's try our best here, without changing too much and risking further breakage.