3.3k sao GitHub và vẫn tăng — ampproject/worker-dom là dự án TypeScript mà TopGit đang theo dõi trên nền tảng. The same DOM API and Frameworks you know, but in a Web Worker.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
An in-progress implementation of the DOM API intended to run within a Web Worker.
Purpose: Move complexity of intermediate work related to DOM mutations to a background thread, sending only the necessary manipulations to a foreground thread.
Use Cases:
Embedded content from a third party living side by side with first party code.
Mitigation of expensive rendering for content not requiring synchronous updates to user actions.
Retaining main thread availablity for high priority updates by async updating elsewhere in a document.
For more information, visit our blog post announcing WorkerDOM or checkout the slides from the announcement at JSConf US.
Installation
npm install @ampproject/worker-dom
Usage
WorkerDOM comes in two flavours, a global variant and a module variant. It is possible to include the WorkerDOM main thread code within your document directly or via a bundler. Here's how you might do so directly:
WorkerDOM has a special output variant that supplies additional hooks for safety features e.g. HTML sanitization. This variant is distributed under the amp folder for main and worker thread binaries:
amp/main.mjs
amp/worker/worker.mjs
This output assumes the consumer will compile this distributed JavaScript to ensure it works with older user-agents.
Debug Distribution
WorkerDOM also has an output variant that includes additional debugging messages. This variant is distributed in the debug folder.
After cloning the repository, you can try out the debug demos with the following.
npm run demo
This script will build the current version of WorkerDOM and start up a local webserver.
Which JavaScript APIs can I use?
Currently, most DOM elements and their properties are supported. DOM query APIs like querySelector have partial support. Browser APIs like History are not implemented yet. Please see the API support matrix here.
Which Browsers are supported?
In general we support the latest two versions of major browsers like Chrome, Firefox, Edge, Safari, Opera and UC Browser. We support desktop, phone, tablet and the web view version of these respective browsers.
Beyond that, we aim for very wide browser support and we accept fixes for all browsers with market share greater than 1 percent.
In particular, we try to maintain "it might not be perfect but isn't broken"-support for IE 11, iOS 8, the Android 4.0 system browser and Chrome 41.
Local Development
Local development of WorkerDOM assumes the following:
Familiarity with npm or yarn
Latest LTS release of Node (10 at time of writing) available.
Comfort with TypeScript, the codebase and tests are entirely written in TypeScript.
Release Log
Each release includes a log of changes with the newly released version. You can find the log here: https://github.com/ampproject/worker-dom/releases
Security disclosures
The AMP Project accepts responsible security disclosures through the Google Application Security program.
Code of conduct
The AMP Project strives for a positive and growing project community that provides a safe environment for everyone. All members, committers and volunteers in the community are required to act according to the code of conduct.
License
worker-dom is licensed under the Apache License, Version 2.0.
ampproject/worker-dom có 3.3k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/ampproject/worker-dom. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
ampproject/worker-dom có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho ampproject/worker-dom. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
ampproject/worker-dom còn đang phát triển không?
Commit gần nhất trên ampproject/worker-dom là 14 ngày trước (theo timestamp GitHub). Repo có 153 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
ampproject/worker-dom viết bằng ngôn ngữ gì?
ampproject/worker-dom chủ yếu viết bằng TypeScript. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc thêm về ampproject/worker-dom ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/ampproject/worker-dom là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về worker-dom?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về worker-dom.