onProductSelect
Registers a callback that runs when a user selects a product via the product catalog.
Usage
(async () => {const api = await Canva.Partnership.initialize({apiKey: "<partner_api_key>",autoAuthToken: "<auto_auth_token>",container: document.getElementById("container"),});const onProductSelect = (opts) => {// the user has selected a product via the catalogconsole.log(opts);};api.showCatalog({onProductSelect,});})();
javascript