@@ -9,7 +9,7 @@ The sample code here is provided as a starting point for how to accomplish tasks
9
9
``` javascript
10
10
document .body .style .overflow = ' hidden' ;
11
11
12
- function sendResizeMessage () {
12
+ let sendResizeMessage = () => {
13
13
window .parent .postMessage ({
14
14
type: ' IFRAME_HEIGHT_RESIZE' ,
15
15
target: ' test-integration-iframe' , // Note: Replace 'test-integration-frame' with your actual iframe identifier.
@@ -28,17 +28,17 @@ if (window.ResizeObserver) {
28
28
> Integration Code:
29
29
30
30
``` javascript
31
- (function ( WIAPI ) {
31
+ (WIAPI => {
32
32
const API = new WIAPI (' test-integration' ); // Note: Replace 'test-integration' with your actual integration identifier.
33
33
34
- API .insert (' content' , function (elem , meta ) {
34
+ API .insert (' content' , (elem , meta ) => {
35
35
const iframeElem = document .createElement (' iframe' );
36
36
iframeElem .src = ' https://www.yourdomain.com/path-to-iframe.htm' ;
37
37
iframeElem .classList .add (' test-integration-iframe' ); // Note: Replace 'test-integration-frame' with your actual iframe identifier.
38
38
API .append (elem, iframeElem);
39
39
});
40
40
41
- function setIframeHeight (e ) {
41
+ let setIframeHeight = (e ) => {
42
42
if (e .origin !== ' https://www.yourdomain.com' ) {
43
43
// You should ALWAYS verify the origin matches the third party domain
44
44
// the iframe is loaded from. For more information, see:
0 commit comments