Skip to content

Back to WatchStarFork

wsf-xi

Web Platform. Safari 13 Beta release notes: Pointer Events are finally good to go, Safari gets the Visual Viewport API (available in Chrome, and behind a flag in Firefox), programmatic paste on iOS, and the ability for PWAs to access the camera / More on CSS Grid Level 2, available in Firefox Nightly, by Rachel Andrew / The CSS Mindset by Max Böck

The Commons. W3C TAG Ethical Web Principles / The Economics of Package Management by C J Silverio / A highly opinionated guide to learning about ActivityPub by Darius Kazemi / Tech Veganism by Nolan Lawson / Black and white and RSS by Giles Turnbull, a stream of black and white photographs, updating throughout June 2019, only available on RSS

UI / Accessibility. A Twitter bot that tweets user interfaces from VST audio plugins / uibot by Janne Aukia, an experiment on how far one could automate the generation of visual designs, what kinds of advantages it would lead to and what issues one would face / Tabindex: it rarely pays to be positive by Scott O'Hara

SSG. Cupper, a documentation builder / medium-to-own-blog by Mathieu Dutour / Use Eleventy To Generate A Ghost Blog, a tutorial by David Darnes on writing in Ghost but building with Eleventy.

Workflows. How I actually wrote my first ebook by Pete Corey

Creative coding. Anders Hoff has written about his recent generative work: A tangle of webs, A tangle of webs 3D, Depth of field / awesome-casestudy, a list of technical case studies on WebGL and creative development / The essence of constraint is projection by Johnathon Selstad

Toolbox. Zdog by David DeSandro, a round, flat, designer-friendly pseudo-3D engine for canvas & SVG / CSS Grid Generator by Sarah Drasner / extra.css by Una Kravets (the demos only work in Chrome so far); more on Houdini


TIL

The append() DOM method, an alternative to appendChild() that lets you add many elements (and text nodes) at once.

Intercepting "plain clicks"

Problem: you have a bunch of links which are supposed to work like normal links. But, on a "plain click", you want to execute some equivalent JavaScript (think turbolinks or pjax). How do you do that in the most unobtrusive way?

A workable solution below. (Can it be improved?)

const isPlainClick = e =>
// The primary button was clicked...
e.button === 0 &&
// ...and no modifier keys are present
!e.ctrlKey &&
!e.metaKey &&
!e.shiftKey &&
!e.altKey;

el.addEventListener('click', e => {
if (isPlainClick(e)) {
e.preventDefault();
doStuff();
}
});

Soundtrack: Michelle Gurevich — Exciting Times