Skip to content

Commit 99827ce

Browse files
committed
Chat: proper app-bridge script in example
1 parent 00630c4 commit 99827ce

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/ui-extensions/src/surfaces/checkout/components/Chat/examples/app-bridge-communication.example.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ shopify.extension.port.onMessage = async (event) => {
88
if (event.data.action === 'ping') {
99
buyerFirstName = event.data.buyer.firstName;
1010

11-
await shopify.extension.messagePort.postMessage({
11+
await shopify.extension.port.postMessage({
1212
action: 'pong',
1313
});
1414
}

packages/ui-extensions/src/surfaces/checkout/components/Chat/examples/app-bridge-resize.example.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@
3333
// - resize the iframe to the button's size
3434
if (dialog.classList.contains('visible')) {
3535
dialog.classList.remove('visible');
36-
shopify !== undefined && window.shopify.resizeTo(150, 50);
36+
shopify !== undefined && window.resizeTo(150, 50);
3737

3838
// if the dialog is not visible,
3939
// - resize the iframe to the desired dialog's size
4040
// - then show the dialog
4141
} else {
42-
shopify !== undefined && window.shopify.resizeTo(415, 700);
42+
shopify !== undefined && window.resizeTo(415, 700);
4343
dialog.classList.add('visible');
4444
}
4545
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<head>
2-
<script src="https://cdn.shopifycloud.com/checkout-web/assets/app-bridge-checkout.js"></script>
2+
<script src="https://cdn.shopify.com/shopifycloud/checkout-web/assets/app-bridge-checkout.js"></script>
33
</head>

0 commit comments

Comments
 (0)