
Sam Richard
@Snugug
BBQ lead, ChromeOS DevRel. Mostly food, sometimes design and development, especially for the web. 7008px tall. He/him.
An archive of my Twitter timeline up until I moved to Mastodon. You can find me there at @[email protected]
Writing a new talk and I think I’m going to propose a modern “Cutting the Mustard” progressive enhancement technique:
<script type=“module” src=“./mustard.js”></script> <script nomodule src=“./no-mustard.js”></script>
Progressive enhancement so small it’s tweetable
I wrote up a little article explaining how to use JavaScript modules as a modern Cutting the Mustard technique.
Progressive Enhancement FTW.
snugug.com/musings/modern-cutting-the-mustard Snugug/1023185226644836352
Only Safari 10.1/10.3 (desktop/iOS) doesn’t support both attributes caniuse.com/#feat=es6-module
Can combine with github.com/malyw/es-modules-utils for a CSS body class and/or JS property you can query and work from.
type=“module” and the nomodule attribute also work for inline JavaScript, so code inline to your heart’s content and PE all the way.