Last issue I wrote a very clickbaity enticing cool bit about all the WordPress drama… and I shared the wrong link. I’ve already atoned for my mistake (by responding to ~100 emails letting me know 🫶). So here it is for real this time – my b.
Take the new, shorter version of Developer Nation’s global survey to help shape key trends in web dev and win some amazing prizes. You’ll also get a free virtual goodie bag that’s packed with helpful resources. [sponsored]
Quentin Spencer-Harper wrote about lessons learned from testing over 1 million lines of TypeScript code while working as a frontend lead at Palantir for 10 years. I didn’t realize that former Palantir employees were allowed to speak after leaving the company, so this was a pretty interesting read.
mitata is a powerful JavaScript benchmarking library with ascii visualizations, automatic garbage collection, and built-in confirmation bias 🥰.
The two Convex co-founders made a YouTube video called Why Convex Sucks, where they take turns… crapping on their own product? And then they paid us to mention it in Bytes? Now that’s a big-brain marketing strategy I can get behind. [sponsored]
Right after we wrote about Declarative Shadow DOM last week, Ryan Carniato wrote a slightly more opinionated article called Web Components are not the future.
Lydia Hallie wrote a visual JavaScript primer to Durable Functions.
Sentry created an Open-Source Pledge, where companies can sign up to pay OSS maintainers a fixed amount per year, self-report on it annually, and hopefully win some good karma from the software gods.
Mat Marquis wrote this guide to destructuring in JavaScript.
Erik Bernhardsson wrote an article called, It’s hard to write code for computers, but it’s even harder to write code for humans. I could’ve sworn that was a song title from the first Fall Out Boy album.
What gets logged when you click the inner div?
// Outer div clicked! <div id="innerDiv">Inner Div</div>
// Inner div clicked! <div id="innerDiv">Inner Div</div>
Even though stopPropagation()
is called in the child’s event handler, the parent’s event handler still executes because it’s set to capture, and it executes before the event reaches the child in the capturing phase.
If the parent’s event handler was set to bubble, then the child’s event handler would execute first, and the parent’s event handler would not execute at all because the event would have been stopped in the child’s event handler.
Lastly, the target
property of the event object is always the element that the event was dispatched to, which is the inner div in this case.
Built with ❤️ by uidotdev
50 W Broadway Ste 333 PMB 51647 Salt Lake City, Utah 84101
上一期我写了一篇关于所有 WordPress 戏剧的非常吸引点击的诱人很酷的内容……但我分享了错误的链接。我已经弥补了我的错误(通过回复约 100 封让我知道的电子邮件🫶)。所以[这里](https://click.convertkit-mail4.com/0vuvlov37di9hop55gqhpuv5r3x55hn/6qhehou786prn9ho/aHR0cHM6Ly93d3cudGhldmVyZ2UuY29tLzIwMjQvOS8yNy8yNDI1NjM2MS93b3JkcHJlc3Mtd3 AtZW5naW5lLWRyYW1hLWV4cGxhaW5lZC1tYXR0LW11bGxlbndlZw==)这次是真的——我的b。
参加[新的较短版本的 Developer Nation 全球调查](https://click.convertkit-mail4.com/0vuvlov37di9hop55gqhpuv5r3x55hn/25h2h9u2p07945s3/aHR0cHM6Ly9kZXZlbG9wZXJlY29ub21pY3MubmV0Lz9tZW1iZXJfaW Q9Ynl0ZXMmdXRtX21lZGl1bT1ubF9hZF8y) 帮助塑造网络开发的关键趋势并赢得一些惊人的奖项。您还将获得一个免费的虚拟礼包,其中包含有用的资源。 [赞助]
Quentin Spencer-Harper 写了[从测试超过 100 万行 TypeScript 代码中吸取的教训](https://click.convertkit-mail4.com/0vuvlov37di9hop55gqhpuv5r3x55hn/qvh8h8urm28wngfl/aHR0cHM6Ly93d3cubWV0aWN1bG91cy5haS9ibG9nL2xlc3NvbnM tZnJvbS1hLWRlY2FkZQ==) 在 Palantir 担任前端主管10年。我没有意识到前 Palantir 员工在离开公司后还可以发言,所以这是一本非常有趣的读物。
mitata是一个强大的JavaScript基准测试库,具有ascii可视化、自动垃圾收集和内置功能存在确认偏差🥰。
两位 Convex 联合创始人制作了一个 YouTube 视频,名为 [Why Convex Sucks](https://click.convertkit-mail4.com/0vuvlov37di9hop55gqhpuv5r3x55hn/9qhzhdupv3gw96a9/aHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g\_dj1GTWhhTTN5 WFliaw==),他们轮流…在他们自己的产品上拉屎?然后他们付钱给我们在 Bytes 中提及它?现在这是我可以支持的一个大大脑营销策略。 [赞助]
就在我们上周写完关于 Declarative Shadow DOM 的文章之后,Ryan Carniato 写了一篇“稍微”更固执己见的文章,名为 [Web 组件不是未来](https://click.convertkit-mail4.com/0vuvlov37di9hop55gqhpuv5r3x55hn/3ohphdu759qmzrar/aHR0cHM6Ly9kZXYudG8vcnlhbnNvbGlkL3dlYi1 jb21wb25lbnRzLWFyZS1ub3QtdGhlLWZ1dHVyZS00OGJo )。
Lydia Hallie 编写了 [Durable Functions 的可视化 JavaScript 入门指南](https://click.convertkit-mail4.com/0vuvlov37di9hop55gqhpuv5r3x55hn/n2hohqu395nqr5a6/aHR0cHM6Ly93d3cuaW5uZ2VzdC5jb20vYmxvZy9kdXJhYmxlLWZ1b mN0aW9ucy1hLXZpc3VhbC1qYXZhc2NyaXB0LXByaW1lcg==)。
8。哨兵创建了[开放式承诺](https://click.convertkit-mail4.com/0vuvlov37di9hop55gqhpuv55555hx55hx55hn/48hvh7urdq0ldq0ldq0ldq0lbx/ahr0lngnb x每年固定金额,自我报告每年都会这样做,并希望从软件之神那里赢得一些善意。
Mat Marquis 写了这篇 [JavaScript 解构指南](https://click.convertkit-mail4.com/0vuvlov37di9hop55gqhpuv5r3x55hn/wnh2h6uw2vr7got7/aHR0cHM6Ly9waWNjYWxpbC5saS9ibG9nL2EtZ3VpZGUtdG8tZGVzdHJ1 Y3R1cmluZy1pbi1qYXZhc2NyaXB0Lw==)。
Erik Bernhardsson 写了一篇文章,名为[为计算机编写代码很难,但为人类编写代码更难](https://click.convertkit-mail4.com/0vuvlov37di9hop55gqhpuv5r3x55hn/reh8h9u0lvqdxqt2/aHR0cHM6Ly9lcmlrYmVybi5jb20vMjAyNC8wOS8 yNy9pdHMtaGFyZC10by13cml0ZS1jb2RlLWZvci1odW1hbnM=)。我可以发誓这是《Fall Out Boy》第一张专辑中的歌名。
单击内部 div 时会记录什么?
// Outer div clicked! <div id="innerDiv">Inner Div</div>
// Inner div clicked! <div id="innerDiv">Inner Div</div>
即使在子级的事件处理程序中调用了 stopPropagation() ,父级的事件处理程序仍然会执行,因为它设置为捕获,并且在捕获阶段事件到达子级之前执行。
如果父级的事件处理程序设置为冒泡,则子级的事件处理程序将首先执行,而父级的事件处理程序根本不会执行,因为该事件将在子级的事件处理程序中停止。
最后,事件对象的“target”属性始终是事件被分派到的元素,在本例中是内部 div。
由 [uidotdev] 使用 ❤️ 构建(https://click.convertkit-mail4.com/0vuvlov37di9hop55gqhpuv5r3x55hn/vqh3hmup93n0gesg/aHR0cHM6Ly91aS5kZXY=)
50 W Broadway Ste 333 PMB 51647 盐湖城,犹他州 84101
发布者