Yesterday I was on a train. I clicked on a link and my browser loaded a long article for me to read. Halfway through reading it, the train went into a tunnel and I lost signal. That meant I couldn't see the images on the other half of the page for the rest of the […]
🆕 blog! “This link is only available by keyboard navigation”
There's a link, right here ➡️⬅️ but, if you're on a touchscreen, you can't tap on it. Using a mouse? Nope, that won't work either. The only way to navigate to it is via keyboard navigation. Hit your Tab ⭾ button! There's a little bit of me wants to build an entire website which can […]
#JavaScript doesn't have any customisable dialog boxes, so you have always had to build your own. Since #HTML5, there's the dialog element for that, which is neat, but comes with the additional problem of not blocking execution until it's closed.
So now I, wanting to replace a confirm call with a custom dialog, have to figure out how to halt my script until the dialog has been closed, and ahhhhh!!!
I tried creating a new Promise object, calling await myPromise, and resolving that promise with the dialog's OK button, but that failed because the promise doesn't have a built-in resolve function (how could it, it's supposed to be resolved externally).
AHHHHH!!!!!!
Why the fuck does JavaScript not have a proper waitUntil function? Now I have to do it dirty with while(!checkOpen(myDialog)) { }, which is just nasty.