话题编程语言 › JavaScript

编程语言:JavaScript

关联话题: JS

JavaScript 中的依赖注入

依赖注入是编程领域中一个非常常见的设计模式,它指的是将应用程序所需的依赖关系通过构造函数参数或属性自动注入的过程。

JS 的异步机制一探

异步机制是通往 JavaScript 精通之路的重要环节,在日常编程中如果理解不足,容易留下难以排查的 Bug,本文先介绍 JavaScript 异步编程发展历程,再通过实例来说明不同场景下异步编程的注意点。

Flutter for Web 首次首屏优化——JS 分片优化

Flutter for Web(FFW)从 2021 年发布至今,在国内外互联网公司已经得到较多的应用。作为 Flutter 技术在 Web 领域的有力扩充,FFW 可以让熟悉 Flutter 的客户端同学直接上手写 H5,复用 App 端代码高效支撑业务需求;在 App 侧 FFW 也可作为 Flutter 动态下发的兜底方案。总的来说在业务和技术上 FFW 都具有相当的价值。

然而在使用 FFW 时有一个明显的问题:其编译产物 main.dart.js 较大,初始的 Hello world 工程编译后产物 js 大小为 1.2 MB,添加业务代码后 js 的大小还会继续增加。在阿里卖家的内容外投业务中,3 个页面的工程 js 大小为 2.0 MB,js 文件过大直接的影响就是页面首次首屏加载的速度。针对 js 的大小有较多优化方法,本文主要记录 main.dart.js 分片优化方案的实现。

javascript 异常处理的一些经验

本文介绍了js异常处理的一些经验。

阿里巴巴 Noslate 正式开源 - 面向云原生的 JavaScript 容器方案

今天,向大家正式介绍阿里最新面向云原生场景,面向 Serverless 架构下的新开源产品, 代号 Noslate。

利用fuse.js实现搜索菜单功能

fuse.js前端实现菜单模糊搜索,你值的一试。

使用 WebAssembly 打造定制 JS Runtime

直接在浏览器上去定制 Runtime 这个想法确实很酷,但显然难度属于地狱级,这相当于我们直接去爆改 V8、JavaScriptCore 这种成熟稳定又复杂的JS引擎来是实现 JS API层面的嵌入和拓展,但 JS 引擎并不只是浏览器独有,真要改的话,可以找一个轻量、好改、好移植的。

很好,但是OS binding怎么办?总不能直接把浏览器里的JS引擎整个替换成这个不复杂,又好改,又好移植的吧?确实这里是一个坎,卡在这,活就整下去了,暂且先不做 OS binding,改做 Web binding,让Web Assembly来跑 Runtime,然后在 Runtime 里再跑JS,有点套娃了,但它依旧有一些应用的场景。

MemLab: An open source framework for finding JavaScript memory leaks

At Meta, MemLab has helped make significant improvements in memory optimization. We hope it will do the same for the larger JavaScript community.

How to monitor the progress of a Javascript fetch - request and cancel it on demand.

Waiting blows. That goes for many situations in life, including when a website you visit is busy loading new data. However, it's usually helpful to visualize that something is happening in the background. Or be able to pull the plug. Read on to find out how that's to be done with the fetch API.

Javascript obfuscation techniques by example

Sometimes when working on scraping some website you look into JavaScript code and it looks like a complete mess that is impossible to read - no matter how much you squint, you cannot make sense of it. That’s because it has been obfuscated. Code obfuscation is a transformation that is meant to make code difficult to read and reverse engineer. Many web sites utilize JavaScript obfuscation to make things difficult to scraper/automation developers.

Using Hermes’s Quicksort to run Doom: A tale of JavaScript exploitation

In 2020, a security researcher flagged a peculiar bug in Hermes’s Quicksort implementation. Here’s how security teams at Meta fixed the bug.

用 CSS 和 JS 实现时钟效果

JavaScirpt30 是 Wes Bos 推出的一个 30 天挑战。项目免费提供了 30 个视频教程、30 个挑战的起始文档和 30 个挑战解决方案源代码。目的是帮助人们用纯 JavaScript 来写东西,不借助框架和库,也不使用编译器和引用。

Stop The Screen Going To Sleep With JavaScript

We've all been there. Cooking a complex recipe where each step takes a good couple of minutes. Our hands covered in some type of sauce made of who knows how many ingredients. We go to check the next step on our phone only to see that it's gone to sleep due to inactivity. We know that even if we quickly wash our hands, there is inevitably going to be some level of greasy trail left on our phone screen as we are forced to unlock it...

JavaScript代码混淆(上)-aaencode篇

混淆并不是对代码的加密,它旨在替换掉代码中有意义的信息,将原本清晰的代码变得复杂;原因是JavaScript代码是公开的,为了让其能正常运行,不能采用加密的方式加密代码;但为了不被轻易获取、破解,我们可以增加阅读代码的成本。

JavaScript代码混淆(下)-JSF*ck篇

前一篇文章介绍的aaencode更多的是因为趣味性而关注,而这篇文章介绍的JSF*ck则是因其明显的特征。

深度剖析 VS Code JavaScript Debugger 功能及实现原理

希望看完本文能让你对 VS Code 的 JavaScript Debugger 有大致的理解。

Home - Wiki
Copyright © 2011-2024 iteam. Current version is 2.125.1. UTC+08:00, 2024-05-17 16:42
浙ICP备14020137号-1 $Map of visitor$