Tagged “javascript”
- Avoiding a DOMContentLoaded gotcha with readyState• 2 min
I recently hit a race condition when a script was loading faster in some browsers.
- Prefill a Shopify discount with the Fetch API• 2 min
Set a prefilled discount in checkout with a fetch request.
- Implement a low stock notice in a Shopify theme• 5 min
A simple way to display a notice when the selected variant has a stock quantity below a specified value.
- Quick error reporting with Val Town• 6 min
Using Val Town's simple storage and notifications to rig up a lightweight error reporting system.
- Observing cart changes in a Shopify theme• 8 min
Identifying and responding to changes in a customer's cart.
- Hello World with Lit• 6 min
Tinkering with Lit: a web components framework.
- Compiling `.kit` files with Grunt• 3 min
How to generate HTML from `.kit` files without access to CodeKit.
- Using PostCSS and Autoprefixer with esbuild• 3 min
Updating an esbuild config in a Shopify theme to utilise autoprefixer.
- Refactoring a Shopify upsell widget to a Custom Element• 5 min
Often shop owners want the ability to offer a small upsell that can be easily added to an order.
- Adding VAT to 31,522 Shopify prices as quickly as possible• 5 min
Yay! Shopify finally handles tax in a way that's useful for Europeans.
- Using Jest tests to replace jQuery in a Shopify theme• 7 min
A strategy for safely removing jQuery as a dependency from custom Shopify themes.
See all tags.