frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

A prototype of an event driven JavaScript framework

https://github.com/patrickjh/ForeignKeyFramework
2•pianopatrick•1h ago

Comments

pianopatrick•1h ago
I didn't like Vue or React so I've been working on my own Javascript framework this year. I wanted to share it at some point as I've gotten value from so many other people's projects. Maybe someone will benefit from my project too.

My framework uses an html attribute called foreignkeys="" to hold urls with custom schemes that reference pieces of browser state. When that browser state changes, the framework searches for all the linked elements and emits a 'foreignkey' event on them. This uses a ForeignKeyEvent event object that has the value of the changed data and the url key that changed. Then the elements just react to the change via event listener code.

The benefit of doings things this way are: 1. I can write normal event driven javascript code and object oriented custom elements. No functional code or anything like JSX is required. 2. The framework can use setTimeout() to return control to the browser between processing each event. With this the page can update one element at a time while letting the browser render in between. I did set things up so that visual elements update synchronously while hidden elements update one at a time. 3. In theory, because the reactivity information is contained in an HTML attribute, this should integrate nicely with server rendered HTML. Should be able to render some regular HTML with foreignkeys="" to state that will change. Then when the javascript code is loaded and runs, the UX can react to future state changes. I use Firebase and don't do any server rendering right now so I haven't tested that, but I think it could be made to work.

I am currently in the middle of rewriting a personal project to use this, so it's still a work in progress. Let me know what you think.

UN environment report 'hijacked' by US and others over fossil fuels

https://www.bbc.com/news/articles/c1w9ge93w9po
1•defrost•2m ago•0 comments

Embracing the Improbable

https://kevinkelly.substack.com/p/embracing-the-improbable
1•thm•4m ago•0 comments

The 70-20-10 growth formula that’s speeding up career success

https://www.indiatoday.in/education-today/jobs-and-careers/story/the-70-20-10-growth-formula-that...
1•rustoo•10m ago•0 comments

Factor 0.101 Now Available

https://re.factorcode.org/2025/12/factor-0-101-now-available.html
1•todsacerdoti•12m ago•0 comments

It's not censorship. It's democratic self-defense

https://civiceconomist.substack.com/p/its-not-censorship-its-democratic
3•ggirelli•13m ago•0 comments

Show HN: How to get sha Dow ba nn ed

1•shadowbannedehy•15m ago•0 comments

Stop asking AI to write code

https://bsky.app/profile/beddel.bsky.social/post/3m7juvz7hwc25
1•mesenga•17m ago•1 comments

Show HN: Repack AI – Turn Any Article/Video URL into 10 Social Content Pieces

https://repackai.co/
2•azureray•19m ago•3 comments

Show HN: Arc – Android overlay to run custom AI prompts on any app

https://play.google.com/store/apps/details?id=com.rethink.arc&hl=en_US
1•rethink-hub•20m ago•0 comments

Show HN: A deterministic code-rewrite engine that learns from one example

1•heavymemory•21m ago•0 comments

Zero Lines of code. 1 AI prompt. 1 deployed website

https://github.com/cloudflare/vibesdk
1•bakigul•21m ago•0 comments

Campus Characters: Identical twins, the Byers, live identical lives (2014)

https://thedailytexan.com/2014/03/31/campus-characters-identical-twins-the-byers-live-identical-l...
1•TMWNN•22m ago•0 comments

EU launches antitrust probe into Google's use of online content for AI purposes

https://ec.europa.eu/commission/presscorner/detail/en/ip_25_2964
7•skilled•22m ago•1 comments

Show HN: A deterministic code-rewrite engine that learns from one example

1•hypmachine•24m ago•0 comments

30 Year Anniversary of WarCraft II: Tides of Darkness

https://www.jorsys.org/archive/december_2025.html#newsitem_2025-12-09T07:42:19Z
2•sjoblomj•26m ago•0 comments

Show HN: I built a website that runs itself. Roast my AI-generated content

https://www.stvck.dev
2•since•27m ago•2 comments

Stack Overflow: Challenge #14 Signal from Noise

https://stackoverflow.com/beta/challenges/79838396/challenge-14-signal-from-noise
1•signa11•29m ago•0 comments

Plead guilty to laptop farm and ID theft scheme to land N. Koreans US IT jobs

https://arstechnica.com/security/2025/11/5-plead-guilty-to-laptop-farm-and-id-theft-scheme-to-lan...
2•PaulHoule•30m ago•0 comments

Antifragile Programming and Why AI Won't Steal Your Job

https://lemire.me/blog/2025/11/29/antifragile-programming-and-why-ai-wont-steal-your-job/
1•signa11•30m ago•0 comments

An Interesting Problem: The Lua Function `Next`

https://www.openstreetmap.org/user/aselnigu/diary/407868
1•altilunium•31m ago•0 comments

Win Josh Comeaus New Course: Whimsical Animations

https://nordcraft.com/christmas
6•AndreasMoeller•31m ago•4 comments

I Compared the 5 Most Popular AI Logo Tools – Here's What No One Tells You

https://www.brandolia.io/blog-comparatif-5-outils-ia-logo-branding.html
2•Sabr0•31m ago•1 comments

Stay Connected Privately with Global ESIM

https://silent.link/
1•beeburrt•32m ago•0 comments

Show HN: I replaced Markov Chains with Biomechanics to predict word transitions

https://github.com/Professor-Sam-Sepi0l/biomechanical-linguistics-poc
2•Sam_Sep10l•33m ago•1 comments

Standalone Meshtastic Command Center – One HTML File Offline

https://github.com/Jordan-Townsend/Standalone
2•Subtextofficial•35m ago•1 comments

Key handover in the dark: Syncthing fork community raises alarm

https://www.heise.de/en/news/Key-handover-in-the-dark-Syncthing-fork-community-raises-alarm-11107...
2•cheesepaint•35m ago•0 comments

39C3 Fahrplan 2025

https://fahrplan.events.ccc.de/congress/2025/fahrplan/
1•todsacerdoti•37m ago•0 comments

Review of Photonic Integrated Optical Phased Arrays for Space Optical Comms

https://ieeexplore.ieee.org/document/9222022
1•rbanffy•39m ago•0 comments

Practical Guide to Xhtml (2021)

https://www.nayuki.io/page/practical-guide-to-xhtml
1•birdculture•39m ago•0 comments

ICEBlock App Dev Sues Trump Officials, Claims Apple Was Pressured to Remove App

https://www.macrumors.com/2025/12/08/iceblock-dev-sues-trump-administration/
3•7777777phil•39m ago•0 comments