🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

parallel-dom

Package Overview
Dependencies
Maintainers
0
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parallel-dom

pdom

npmnpm
Version
0.6.0
Version published
Weekly downloads
1K
-13.55%
Maintainers
0
Weekly downloads
 
Created
Source

Parallel DOM

npm version

Make your apps faster, parallelize away heavy DOM operations.

Usage

import PDom from 'parallel-dom';

const pdom = new PDom(
    '#element',
    () => import('path/to/script/which/runs/in/parallel')
);
pdom.render();

Under the hood

  • Creates an iframe on a https://<hash>.pdom.dev domain.
  • Passes the scriptUrl and creates a clone of the passed DOM element to the above frame.
  • The iframe loads and runs the script.
  • Since, iframe is cross origin, the browser creates a dedicated process for it.
  • We use origin-agent-cluster header to enable multiple PDom to have their own dedicated subframe process.

For more details:

FAQs

Package last updated on 28 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts