GuidesAPI GuideChangelog
Log In
Guides

Bridge Integration

📘

What is Library Bridge Configuration?

This feature allows you to override default behaviors with custom actions for specific events.

// Example: In the default behavior, clicking a broadcast card navigates to the broadcast URL.
 function flexCollectMoveBroadcast(params){
         console.log('flexCollectMoveBroadcast',params)
     }
// Once declared, clicking a broadcast card logs the data to the console instead,
// and the default navigation behavior is cancelled.

Example Code

Bridge configuration works the same way as in the basic usage or modular usage of the library.
Once you declare the bridge functions, simply follow the standard library setup as usual.

<html>
  <head>
    <title>sauce live example</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, viewport-fit=cover, shrink-to-fit=no" />
    <script src="https://collection.sauceflex.com/static/js/SauceWebLib.js"></script>
  </head>
  <body>
  <div id='curation'></div>
  </body>
  <script>
    // Automatically triggered on page load.
    // function flexCollectEnter(){
    //   console.log('flexCollectEnter')
    // }
    //  Triggered when the login button is clicked.
    // function flexCollectLogin(){
    //   console.log('flexCollectLogin')
    // }
    // Triggered when a broadcast card is clicked.
    // function flexCollectMoveBroadcast(params){
    //   console.log('flexCollectMoveBroadcast',params)
    // }
    //   Triggered when a product is clicked.
    // function flexCollectMoveProduct(params){
    //   console.log('flexCollectMoveProduct',params)
    // }
    //  Triggered when the top banner is clicked.
    // function flexCollectMoveTopBanner(params){
    //   console.log('flexCollectMoveTopBanner',params)
    // }
    // Triggered when a user applies for a broadcast notification.
    // function flexCollectApplyForNotification(params){
    //   console.log('flexCollectApplyForNotification',params)
    // }
    // Triggered when a user cancels a broadcast notification.
    // function flexCollectCancelForNotification(params){
    //   console.log('flexCollectCancelForNotification',params)
    // }
    // Triggered when a custom broadcast button is clicked.
    // function flexCollectBroadcastCustomButton(params){
    //   console.log('flexCollectBroadcastCustomButton', params)
    // }
    // Library initialization — works the same as in basic or modular setup.
   window.addEventListener('load',()=>{
     window.SauceWebLib.setInit({ partnerId:  'partnerId' });
     window.SauceWebLib.load('curation');
     // or window.SauceWebLib.loadCuration({curationId:'XXXX',elementId:'curation' });
    }) 

  </script>
</html>

Did this page help you?
🏠 소스라이브 🎬 소스클립 🔗 소스링크 📢 소스애드
🧩 API 가이드
🆕 최근 업데이트
💬 도움이 더 필요하신가요?
메일로 문의 카카오톡 채널로 문의
담당자에게 문의하기

궁금한 점이나 불편했던 점을 남겨주시면 담당자가 확인 후 답변드릴게요.

가이드 챗봇 BETA
* AI를 활용해 답변해서 사실과 다를 수도 있어요. 더 궁금한 사항은 '담당자에게 문의하기'를 이용해주세요.
💡 궁금한 솔루션(예: 라이브, 링크 등)을 함께 적어주시면 더 정확한 답변을 받을 수 있어요.