promises-spec
dom
promises-spec | dom | |
---|---|---|
22 | 30 | |
1,831 | 1,535 | |
0.2% | 0.9% | |
0.0 | 6.5 | |
9 months ago | 12 days ago | |
HTML | ||
Creative Commons Zero v1.0 Universal | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
promises-spec
-
Implement Promises/A+ from scratch
Today, I tried implementing Promises/A+ from scratch to test my coding skill. In the process, I’ve crafted this guide to share my insights and experiences with those who share a similar interest. Without further ado, let’s dive in.
-
Using XPath in 2023
That made me chuckle.
For those not familiar with the promise design controversy:
http://brianmckenna.org/blog/category_theory_promisesaplus
https://github.com/promises-aplus/constructor-spec/issues/24
https://github.com/promises-aplus/promises-spec/issues/94
-
Why is JavaScript so hated?
If you really want to go down the rabbit hole on this one, start here
-
What the imperative shell of an Functional Core/Imperative Shell language looks like
Advantage 1, nesting, is the most important here, and it's often the most-overlooked advantage. Overlooking nesting is how Promises in Javascript got to be fundamentally broken.
-
[AskJS] Is JavaScript missing some built-in methods?
Have you read the infamous GitHub thread where people tried to fix this before it got finalized? It's quite a trip
-
This typo lasted several pomodoro sessions.
1.) JS implementation of Promise is not a monad. See this StackOverflow answer or this GitHub discussion for more details
-
How to implement Promise in a FAANG interview
In this article, we will go over how to implement a basic version of a promise during a FAANG interview. The standard for promise implementation is called A+, but it includes a huge amount of details, making it almost impossible to implement all of them during a one-hour coding interview. Therefore, we will focus on implementing a basic variation that should be enough to show the interviewer your solving skills.
- what object
-
Oopsy Poopsy ahahaha *sharts uncontrollably*
Hey, at least you weren't these guys: https://github.com/promises-aplus/promises-spec/issues/94
-
Haskell is the greatest programming language of all time ... the rational adult in a room full of children ... When I program in Haskell, I am in utopia. I am in a different world than 99.9% of what I see posted on Reddit.
Total carnage
dom
-
A Response to "Have Single-Page Apps Ruined the Web?"
in plain htmx, you can target an area that doesn't disrupt a playing video (e.g. the comments box appending to the comments) or you can use a morphing algorithm that disrupts the DOM less.
i have my own morphing algorithm (and a corresponding htmx plugin that allows you to use it) called idiomorph:
https://github.com/bigskysoftware/idiomorph/
i've also been working with the chrome team to get a feature added they are calling "atomic moves":
https://github.com/whatwg/dom/issues/1255
this would allow us to move elements around in the DOM without losing things like play state or focus or whatever
very excited for this last idea, I think it will be a huge boon for the web in general, not just for htmx
-
HTML Attributes vs. DOM Properties
What I said in my previous comment is observably true. Try making a demo where it isn't.
> A DOM node is a living mutable thing, but the JavaScript object representing that node is not.
The JavaScript object is mutable. The first example in the article shows this.
> That is also why a node list is not an array.
Modern APIs on the web return platform arrays (eg JavaScript arrays). https://webidl.spec.whatwg.org/#js-sequence - here's where the WebIDL spec specifies how to convert a sequence to a JavaScript array.
I'm fully aware of NodeList. There's a reason the spec calls them "old-style" https://dom.spec.whatwg.org/#old-style-collections
> I can understand how this is confusing if you have never operated without a framework, but otherwise it’s really straightforward
Sighhhhhh. I've been a web developer for over 20 years, and spent a decade on the Chrome team working on web platform features. Most of my career has been on the low-level parts of the platform.
Could it be possible that people are disagreeing with you, not because they're stupid, but because you're in the wrong? Please try to be open minded. Try creating some demos that test your opinions.
-
Using XPath in 2023
Domenic Denicola (the man who ruined promises) probably will as well.
https://github.com/whatwg/dom/issues/67
-
Which browser do you recommend, one for personal security-focused use and one for work?
I'm pretty sure it is, since I get "TypeError: nodes[i].parentNode.href is undefined" and "TypeError: $mainmenu.parent(...).get(...) is undefined" errors on both Pale Moon and LibreWolf. Which is part of Shadow/DOM, and originated from google (https://hacks.mozilla.org/2015/06/the-state-of-web-components/). Not sure when this particular thing was introduced, since it's a "living standard"/experimental feature (https://dom.spec.whatwg.org/).
-
That people produce HTML with string templates is telling us something
JSX chose to align names to the DOM spec [0]. Same for htmlFor and friends.
[0] https://dom.spec.whatwg.org/#ref-for-dom-element-classname%E...
-
Notback BETA - A new PHP frontend framework
You can see why I say this here: https://dom.spec.whatwg.org
-
Understanding the Benefits of "Quirky" Web Languages
The product logos in this article's cover image include different languages and technologies some of which are still relevant for web development today: HTML, CSS, JavaScript / ES / TypeScript (and the DOM), SVG, PDF, PHP, SQL (mySQL, MariaDB), mongoDB, Node.js (the most successful server-side implementation of JavaScript so far).
-
Declarative Shadow DOM
Thanks for the shout-out! I think I mention this in the talk, but note that YMMV. I designed that benchmark as a kind of "worst-case scenario" where shadow DOM / scoped styles really show a benefit. Depending on your CSS rules, DOM size, and amount of thrashing, the perf benefit could be small to large.
Also, it's still possible to shoot yourself in the foot, especially if you have a large/complex stylesheet repeated across multiple shadow roots. (Not because of the repetition – that's optimized in browsers [1] – but rather because of the number of DOM nodes affected.)
That said, I still think the perf benefits of shadow DOM have been undersung. And Declarative Shadow DOM makes it way more useful.
[1]: https://github.com/whatwg/dom/issues/831#issuecomment-585489...
-
HTML DOM ️loves Javascript! 💕 #TLA 😘
We luh-luh-luv you! They gestated and nurtured the spec. They fought over bike sheds! All for us!!
- AI Found a Bug in My Code
What are some alternatives?
proposal-symbol-thenable
hyperHTML - A Fast & Light Virtual DOM Alternative
q - A promise library for JavaScript
extension-manager - A utility for browsing and installing GNOME Shell Extensions.
zx - A tool for writing better scripts
brutal - 🏢 An operating system inspired by brutalist design that combines the ideals of UNIX from the 1970s with modern technology and engineering
proposal-set-methods - Proposal for new Set methods in JS
IntersectionObserver - Intersection Observer
cats-effect - The pure asynchronous runtime for Scala
Isotope - :revolving_hearts: Filter & sort magical layouts
purescript - A strongly-typed language that compiles to JavaScript
WHATWG HTML Standard - HTML Standard