Callbacks Documentation
Edit on
Codepen.io
Codepen.io
data-after-requests-callback
A JavaScript function you should provide, which will be invoked after the request is performed. No parameters are passed to this function.
x
26
1
<!--
2
Configure an add button to add an item to the cart.
3
-->
4
<button data-fsc-item-path-value="phot-io-main-app" data-fsc-action="Add">Add to Cart</button>
5
6
<!--
7
DEMO SETUP
8
- Initialize the Store Builder Library
9
-->
10
<script
11
id="fsc-api"
12
src="https://sbl.onfastspring.com/sbl/1.0.2/fastspring-builder.min.js"
13
type="text/javascript"
14
data-storefront="fastspringexamples.test.onfastspring.com/popup-fastspringexamples"
15
data-after-requests-callback="dataAfterRequestsCallback">
16
</script>
17
18
<!--
19
dataAfterRequestsCallback
20
- In this example, it will write to the console.log when the callback is invoked.
21
-->
22
<script>
23
function dataAfterRequestsCallback() {
24
console.log("This is when the data-after-requests-callback is invoked.");
25
}
26
</script>
1
1
1
1