Guide to migrate from the legacy Web Extension Coupon SDK @sleek/web-ext-coupon-sdk to the modern, more powerful Web Extension SDK @sleek/web-ext-sdk.
We’ve released a new and improved web extension SDK under @sleek/web-ext-sdk, replacing the legacy @sleek/web-ext-coupon-sdk. This new SDK brings enhanced performance, additional capabilities, and a more extensible foundation for future features.If you’re currently using @sleek/web-ext-coupon-sdk, follow the guide below to migrate to @sleek/web-ext-sdk.
If you plan to call getWebExtSdk() immediately after initialization, you must await
the initializeWebExtSdk() promise first. The SDK is not available until initialization completes.
The new @sleek/web-ext-sdk introduces a more modular and intuitive API design. Instead of global functions, you now operate on a specific tab context using .onTab(tabId) for all tab-related actions.Here’s a mapping of commonly used methods to help you migrate: