203 private links
Everything that does not have to be JS anymore, and there is a lot !
I didn't know about the accesskey attribute :)
Native alternatives to lodash utils
Native alternative to date-fns
Examples of UI patterns that does not need JS
Things not needed with javascript: Date-fns and Lodash at the moment.
Most of the time, your job with JavaScript to enhance components’ keyboard accessibility will be done with just a handful of tools, including the use of event listeners and certain JavaScript methods of a couple of Web APIs that can help us in this task.
- keydown event: Instead, the utility of the keydown event comes when you need to add functionality to other keys [than enter or space].
- blur event: most of the time, you’ll use it to reverse the possible changes you have made with the keydown event listener.
- focus event (rare), but instead the focus method!
button.inert
works and avoid a setAttribute.
#idea #project #vue: create a directive to handle keydown and blur event into one action that is reversible.
So now we can have a look at component patterns:
- toggletips
- tabs
- modals
Use one package manager built on top of corepack to support npm, yarn and pnpm.
#idea #project support more package managers such as cargo, deno, ... :)
Oh wait, there is already something https://github.com/egoist/dum
The way to bundle JS projects 😃
How to structure a website that is not built with an SPA style?
const
only ensures that the reference is not modified. The data referenced can be modified though.
Also, primitive data types are immutable. So a const a = 5
can not be updated as 5 as Number can not change.
When we use const, we create an indestructible link between a variable name and a piece of data. We're still allowed to modify the data itself though!
How to create a web worker?
- Create a script that imports another one with
const worker = new Worker('worker.js'
- Bind events emitted by the worker with
worker.onmessage = function(event) { ... }
- Do the same in the web worker with
self.onmessage = function(event) { ... }
- Exchange messages with
worker.postMessage(payload)
orself.postMessage(payload)
One key difference between Web Workers and the main thread is that Web Workers have no access to the DOM or the UI. This means that they cannot directly manipulate the HTML elements on the page or interact with the user.
Get the event information of a keydown event :)
A library to handle right and permissions.
It is very useful if both backend and frontend are written in JS.
A package.json can be provided in order to scan dependencies. It searches for risks.
Checks how vulnerable is a package.
It provides informations to asses if a package is safe enough for the use case.
The tool provides analysis for each line of code too.
A framework to build web components where targets can also be other web frameworks.
A great project to get started with hexagons (for example, a map).
Using POO can help to structure the application code with the d3 library.