m3tti, to javascript German
@m3tti@functional.cafe avatar

This #sql in #js feels like we are heading back to #php so. My web guys tell me what were the real advancements we got in the last 10 years #javascript #webdev #ssr #spa

arnan, to wordpress
schizanon, to webdev
@schizanon@mas.to avatar
andyy, to javascript Polish
@andyy@fosstodon.org avatar

"Eternal triangle of hate" - Boozook

#mem #js #cplusplus #java #rust

tixie, to programming
@tixie@guerilla.studio avatar
amber, to react
@amber@front-end.social avatar

I've been in this industry long enough to see things constantly come & go. #React is no different - it'll be replaced by other frameworks soon & those will be hot for a bit. Then that one will be replaced & so on. Learn your basics! #HTML #CSS, plain #JS. Those are the only things that don't come & go & will take you through your entire career, regardless of what's cool right now. Will I still be coding #WordPress in 10 years? Who knows! But my knowledge of #PHP will carry me on.

schizanon, to javascript
@schizanon@mas.to avatar
aleix, to firefox

Hey, I want to add something to but didn't work on a extension before.

Goal: Add tagging of voice to be able to avoid such videos/creators.

AI voice is probably great for some disabled creators, but it's inaccessible for many others. And it's everywhere. I want us to have a choice.

If a more experienced would be willing to me I'd greatly appreciate that.

Please !

joelanman, to programming
@joelanman@hachyderm.io avatar

Is Playwright a good choice for testing a web app?
#js #webdev

joelanman,
@joelanman@hachyderm.io avatar

thanks for the replies!

and then Jest for unit tests?

#js #webdev

selfhtml, to programming German
@selfhtml@bildung.social avatar

JS + CSS: Use Case für clientWidth und getBoundingClientRect()

Wir haben ja schon einige Beispiele für die Ermittlung von Elementgrößen mit JS.

Aber alle stellen eigentlich nur vor, wie's geht, nicht, wann und wo man es einsetzen sollte.

Habt ihr eine Idee für ein Praxisbeispiel?

#js #css #selfhtml

jimfl, (edited ) to rust
@jimfl@hachyderm.io avatar

Today I learned about @slint (https://github.com/slint-ui/slint) which takes a UI described in a DSL and compiles it to , , or . Runs across multiple platforms.

I’m wondering if anyone has tried using a Slint-built binary as a NIF in . Seems like a powerful combination.

nebyoolae, (edited ) to random
@nebyoolae@masto.neb.host avatar

Javascript.

#javascript #js

minioctt, (edited ) to CSS Italian

[⤴️ https://octospacc.altervista.org/2024/02/01/emmebi-telegrammico/]

L’ultimissimo miglioramento che ho in ogni caso poi fatto ad è stato l’aggiunta di una funzione per importare codice e , per modificare come i post possono essere visualizzati. Entrambi funzionano allo stesso modo, con i relativi parametri URL che accettano sia esterni che data URI. Niente di particolare per gli stili, semplicemente importo nella pagina la qualunque cosa venga data lì, ma per gli è stato leggermente più . 😕️

Il punto sta nel voler evitare che essenzialmente non affidabili siano iniettati nel contesto della pagina semplicemente da URL, perché potrebbero fare tante cosine cattive; prima fra tutte, rubare dall’archiviazione del del mio dominio, cosa che è un , perché gli utenti inesperti che aprono la app da non andranno a cercare di investigare cosa accade dietro le quinte (e, molto probabilmente, non lo farei realisticamente nemmeno io, seguendo la logica del “i miei siti sono miei e li conosco, sui siti altrui ho le protezioni del browser attive“). E quindi inizio a scendere in un rabbithole… ☠️

  • ? Hmm… non so, non è il caso, sarebbero insicuri, ci sono alcuni modi in cui una pagina in frame può fare robe fastidiose. Non può essere assolutamente un’idea, proprio mai (foreshadowing). 🪟️
  • Trovo un bel po’ di vecchie che ricompilano codice per rimuovere pericoli, o lo analizzano preventivamente per la presenza di operazioni dannose così che possa non essere mai eseguito… praticamente tutte abbandonate, qualcuna esplicitamente dichiarata insicura e non patchata, e per qualcun’altra lo possiamo dare per scontato. 🐛️
  • Forse questa libreria più recente, jailed, che sfrutta un iframe assieme ad un Web Worker per creare una sandbox forte e bloccare tutte le eccetto alcune che si decidono… No, l’ho provata e non va bene, non si riescono a passare alla sandbox oggetti complessi, tra cui i costruttori, è impossibile far funzionare API tipo quella del DOM. 🚧️
    • Sarebbe stata un’idea usare qualche reimplementazione del per NodeJS tramite browserify, tipo Cheerio, ma farla anche solo girare lì dentro è un altro casino allucinante. 🥴️
  • WASM tecnicamente è una a sua volta, e non accede alle API del browser se non con codice colla, quindi magari… teoricamente ok, ma nella pratica non ho trovato nessuna soluzione già bella e pronta che potessi usare per questo specifico scopo. 🕳️
  • La : PyScript… sarebbe quasi già pronto, ma avrei dovuto comunque modificarlo per bloccare tutte le API insicure (rimuovere ), e poi richiede 15+ MB di dipendenze di runtime… non ideale. 🗿️

Alla fine ci ho pensato meglio, e sono arrivata alla conclusione che è abbastanza sicuro far girare gli script in un iframe con proprietà src="data:[...]" e sandbox="allow-scripts" (che significa, “blocca tutte le proprietà sensibili eccetto gli script”)… voglio dire, nel visualizzare il contenuto dei siti, già permetto eventuali iframe provenienti dai post, e quelli teoricamente possono già fare quello che vogliono eccetto accedere ai dati della finestra root. Nella pratica, i programmini degli utenti quindi hanno accesso a (quasi) l’intera API JavaScript senza poter fare cose bruttissime. 🎉️

https://octospacc.altervista.org/wp-content/uploads/2024/02/image.pngEcco un esempio di tutto, alla fine: questo URL carica il mio MicroBlog, importa un foglio di che mette questo font buffo, e uno script che colora le parole dei in base a come si ripetono man mano (inutile, ma serve giusto per dare idea delle potenzialità)… <a href="https://hub.octt.eu.org/MBViewer/#/siteUrl=https://octospacc.altervista.org|platform=wordpress.org|includeStyle=data:text/css;utf8,@import%20url('https://fonts.googleapis.com/css2?family=Single+Day&display=swap');.MbPost{font-family:'Single%20Day',cursive;}|includeScript=data:text/javascript;utf8,function%20MbViewerFunction(data){const%20dom=new%20DOMParser().parseFromString(data.html,'text/html').body;const%20tokens=dom.textContent.split('%20');const%20words={};for(const%20i%20in%20tokens){const%20word%20=%20tokens[i];if(words[word])words[word]++;else%20words[word]=1;tokens[i]=%60%3Cspan%20style='color:${atob('Iw==')}${[0,'b58900','cb4b16','dc322f','d33682','6c71c4','268bd2','2aa198','859900'][words[word]]};'%3E${word}%3C/span%3E%60}data.html=tokens.join('%20').replaceAll('nn','%3Cbr%3E');for(const%20img%20of%20dom.querySelectorAll('img'))data.html+=img.outerHTML;MbViewerReturn(data)}">https://hub.octt.eu.org/MBViewer/#/siteUrl=https://octospacc.altervista.org|platform=wordpress.org|includeStyle=[...]|includeScript=[...]</a> (il link con tutta quella roba messa inline è una stringa di quasi 1 KB!). Userò tutta la cosa per rendere gli hashtag nel testo meno intrusivi per il mio sito anche lì, oltre che sul dominio originale. 👋️Finisco con dati ancora più tecnici, per chi non ha una vita: con questo , ogni deve provvedere ad esporre una funzione che, tramite la Channel Messaging API, viene richiamata dalla per ogni messaggio appena questo viene aggiunto al documento visibile; questa funzione riceve dati utili (per ora, solo l’HTML del contenuto; oltre a dati come l’id del messaggio nel flusso, che non sono granché utili all’utente ma devono essere restituiti alla app) e può rimandare nuovi dati indietro richiamando una funzione che è invece l’applicazione ad esporre allo script. Tutto questo ambaradan permetterebbe agli script di effettuare anche operazioni asincrone, comunque, non per forza di dover agire immediatamente alla chiamata. 🤓️

https://octospacc.altervista.org/2024/02/01/emmebi-javascriptico/

schizanon, to react
@schizanon@mas.to avatar

If you think react is complicated now, go back to 2015 when you had to configure babel and webpack yourself, you had to do SSR and routing yourself, you had to decide between flow and typescript, you had to learn flux and immutable.js, and you had to choose 1 of 100 boilerplates

kroc, to random
@kroc@mstdn.social avatar

Just wow. The world is designing websites and apps for the iPhone at the top of this graph whilst the majority of users in the world are using hardware at the bottom. As always, JavaScript was a mistake. https://infrequently.org/2024/01/performance-inequality-gap-2024/ #webdev #css #js #html

schafer, to CSS
@schafer@ohai.social avatar

I have the opportunity to do a redesign of a very large site that I built about 5 years ago and have maintained since. Looking to brush up on the newer #CSS / #JS that’s available to me for #frontend. The current site was built with #JQuery and #flexbox was not even an option at the time. Would love to move to #vanillaJS for most things and get the most out of flexbox that I can.

Looking for good resources, if anyone knows of any.

boilingsteam, to linux
@boilingsteam@mastodon.cloud avatar
raiderrobert, to programming
@raiderrobert@mastodon.social avatar

GO HOME #JS UR DRUNK!!!!!

aral, to SmallWeb
@aral@mastodon.ar.al avatar

Is htmx Just Another JavaScript Framework?

https://htmx.org/essays/is-htmx-another-javascript-framework/

PS. Guess what? Kitten has built-in, first-class support for htmx. (To include it in your page, just add <page htmx> to your markup.)

https://codeberg.org/kitten/app

#Kitten #SmallWeb #web #dev #JS #JavaScript #HTML #HTMX

aral, to programming
@aral@mastodon.ar.al avatar

FSX (a new modern file system module for Node.js) looks really nice. Intelligent defaults and support for mocking designed in.

Would love to see this in core.

https://humanwhocodes.com/blog/2024/01/fsx-modern-filesystem-api-javascript/

BryceWrayTX, to webdev
@BryceWrayTX@fosstodon.org avatar

New post >> It’s tri-state switch time • With thanks as always to other, smarter folks, I implement a mode switch that gives you yet another option.

https://www.brycewray.com/posts/2024/01/its-tri-state-switch-time/

#LightDark #WebDev #CSS #JavaScript #JS

craigabbott, to javascript
@craigabbott@a11y.info avatar

I was today years old when I learned about chaining nullish coalescing operators in as an easy way to check for deep nested properties of an object without having to check each level exists as a separate statement. 🤯

For example: if (user?.details?.name?.first)

cherrykoda, to programming
@cherrykoda@mas.to avatar

Honestly... it's not exactly anything new that's spurred the realisation that React is overcomplicated for what it tries to do. Glad the light is being found, but yikes that was a long time coming.

"React suggests using a framework to start a project, suggesting to use one of the three main open source frameworks, instead of just React." This itself isn't surprising, as React suffers from the same issues as Framework mania.

#js #webdev #developer

https://dev.to/matfrana/react-where-are-you-going-5284

olvigg, to Ukraine Ukrainian

Ok, last try... If I can’t get some kind of job in the near future, then I’ll just die soon.

NodeJS / React developer from Kyiv 🇺🇦

I'm looking for . Urgently.
CV: https://docs.google.com/document/d/1TpOKEwYG02DZznxPpgixv23XdKkRA2asGQIDfuZlFno/edit?usp=sharing

@ua @rada

  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • thenastyranch
  • magazineikmin
  • InstantRegret
  • GTA5RPClips
  • ethstaker
  • Youngstown
  • everett
  • slotface
  • osvaldo12
  • rosin
  • mdbf
  • kavyap
  • DreamBathrooms
  • megavids
  • ngwrru68w68
  • Durango
  • modclub
  • cubers
  • khanakhh
  • Leos
  • tacticalgear
  • cisconetworking
  • vwfavf
  • tester
  • anitta
  • normalnudes
  • JUstTest
  • All magazines