A tiny ~150-byte polyfill for Promise.prototype.finally
.
Useful for browsers that support Promise but not the .finally()
method.
npm install finally-polyfill
// | |
// BottomSheetView.swift | |
// | |
// Created by Majid Jabrayilov | |
// Copyright © 2019 Majid Jabrayilov. All rights reserved. | |
// | |
import SwiftUI | |
fileprivate enum Constants { | |
static let radius: CGFloat = 16 |
I find myself in a tempest in a toaster. Yesterday I (and much of the web standards world) learned about two possible new HTML elements proposed by Google, std-toast
and std-switch
. I had no idea what “toast” meant in the context of the web, a problem shared my many other people. It turns out it’s a UI pattern, those little notices that pop up and then disappear without user interaction.
But wow, new HTML elements! This is the holy grail. In my part of the web we don’t even dream about new HTML elements. Oh, we’ve tried, but Hixie didn’t much care for footnote
, WICG didn’t much care for list titles, and no one much cared about author
. Just last week the author of the extensible web manifesto warned me to never expect new HTML elements, due to the difficulty of changing the parser.
But my concern wasn’t so much about the nature of the new elements, but of how we learned about them and what that says about how web standardization works. My [first tweet](https://twitter.com
Do I want to die on this hill?
Am I including everyone?
Please refer to this blogpost to get an overview.
Replace *-INSTANCE
with one of the public instances listed in the scrapers section. Replace CAPITALIZED
words with their corresponding identifiers on the website.
In honor of the 30th anniversary of the web, I wanted to share a few thoughts about what a better web could aspire to be, and challenge us to move toward it.
It's tempting to frame "better" simply in terms of improvement and progress, as in how far the web has come over the last 20+ years. As a developer, I like many others get all too excited about fancy new features like Service Workers, WebRTC, and yes, even CSS Grids. The pace of change is dizzying, but it feels like a great problem to have too many awesome features to learn and use!
So in one practical respect, a better web is one that empowers developers and users alike to express themselves and connect with others more fluently.
So there were a few threads going around recently about a challenge to write the longest sequence of keywords in Javascript:
There are, however, a few problems:
You are looking at the most important, and most abundant thing on the web. You can't see it, unfortunately, because it's very small… aaaaand it's invisible — so having a magnifying glass doesn't really help here. But still.
I'm talking, of course, about U+0020
; not to be confused with the band U2, who are just as ubiquitous, but far less useful.
This unicode point, representing the humble space character, is between every word, in every run of text, on every page of the web. And it has a very special characteristic: it's not sticky like glue. If two words are neighbors but there's not enough room for both of them, the space will free the second word to wrap around and start a new line.
Before getting into flexible containers, viewport meta tags, and @media
breakpoints this humble character is what makes the web fundamentally 'responsive'. That is: able to change the layout of its content to suit different devices, contexts, and settings. Browser text does this automa
class Foo { | |
constructor(x) { this.foo = x; } | |
hello() { console.log(this.foo); } | |
} | |
class Bar extends Foo { | |
constructor(x) { super(x); this.bar = x * 100; } | |
world() { console.log(this.bar); } | |
} |