{"id":40830,"library":"domino-ext","title":"domino","description":"Server-side DOM implementation based on Mozilla's dom.js. Stable version 2.1.4, released 2023. Fork of fgnass/domino optimized for minification and SVG CSS attribute support. Designed for building pages rather than scraping, it sticks to DOM Level 4 and does not execute scripts or download external resources. It is faster than jsdom for basic DOM manipulation and does not use ES6 proxies, making it compatible with older Node versions.","status":"active","version":"2.1.4","language":"javascript","source_language":"en","source_url":"https://github.com/nidi3/domino","tags":["javascript","typescript"],"install":[{"cmd":"npm install domino-ext","lang":"bash","label":"npm"},{"cmd":"yarn add domino-ext","lang":"bash","label":"yarn"},{"cmd":"pnpm add domino-ext","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM import for default export. CommonJS require works but TypeScript may need esModuleInterop.","wrong":"const domino = require('domino')","symbol":"domino","correct":"import domino from 'domino'"},{"note":"Named export available since v2. Prefer destructured import for tree-shaking.","wrong":"import domino from 'domino'; const createWindow = domino.createWindow;","symbol":"createWindow","correct":"import { createWindow } from 'domino'"},{"note":"Same as createWindow but without window object.","wrong":"import domino from 'domino'; const createDocument = domino.createDocument;","symbol":"createDocument","correct":"import { createDocument } from 'domino'"},{"note":"Access to internal implementations like Element, etc.","wrong":"const impl = require('domino').impl","symbol":"impl","correct":"import { impl } from 'domino'"}],"quickstart":{"code":"import domino from 'domino';\n\nconst window = domino.createWindow('<h1>Hello world</h1>', 'http://example.com');\nconst document = window.document;\nconst h1 = document.querySelector('h1');\nconsole.log(h1.innerHTML); // => Hello world\n\n// Alternatively, create document directly\nconst doc = domino.createDocument('<p>Hello</p>', true);\nconsole.log(doc.body.outerHTML); // => <body><p>Hello</p></body>","lang":"typescript","description":"Create a DOM document from an HTML string and query an element using standard DOM API."},"warnings":[{"fix":"Use Array.from(element.attributes) or for loop with length/item.","message":"Element.attributes is not a true JavaScript array; it lacks array methods like forEach, map, etc.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Pre-render any JavaScript-dependent content server-side or use a headless browser for scraping.","message":"Domino does not execute scripts or load external resources. Dynamic content will not be available.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Use standard attribute methods (getAttribute, setAttribute, removeAttribute) instead.","message":"Attributes do not inherit Node interface per DOM Level 4. Methods like appendChild not available on attributes.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Prefer firstChild/nextSibling over childNodes when doing many DOM manipulations.","message":"childNodes is lazily converted to an array; for performance, use firstChild/nextSibling traversal.","severity":"gotcha","affected_versions":">=1.0"}],"env_vars":null,"search_vec":"'2.1.4':14 '2023':16 '4':40 'attribut':26 'base':7 'basic':56 'build':30 'compat':67 'css':25 'design':28 'dom':5,38,57 'dom.js':11 'domino':1 'download':47 'es6':63 'execut':44 'extern':48 'faster':52 'fgnass/domino':19 'fork':17 'implement':6 'javascript':72 'jsdom':54 'level':39 'make':65 'manipul':58 'minif':22 'mozilla':9 'node':70 'older':69 'optim':20 'page':31 'proxi':64 'rather':32 'releas':15 'resourc':49 'scrape':34 'script':45 'server':3 'server-sid':2 'side':4 'stabl':12 'stick':36 'support':27 'svg':24 'typescript':73 'use':62 'version':13,71","created_at":"2026-06-04T18:49:28.357419+00:00","updated_at":"2026-06-04T18:49:28.357419+00:00","problems":[{"fix":"Use import domino from 'domino' (ESM) or const domino = require('domino') (CommonJS). Ensure domino version >=2.0.","cause":"Using an older version or incorrect import (e.g., default import missing).","error":"TypeError: domino.createWindow is not a function"},{"fix":"Run npm install domino or yarn add domino.","cause":"domino not installed or not in node_modules.","error":"Cannot find module 'domino'"},{"fix":"Use Array.from(element.attributes).forEach(...) or for (let i = 0; i < element.attributes.length; i++) { ... }","cause":"Attributes is an array-like object, not a real array.","error":"element.attributes.forEach is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/nidi3/domino","github":"https://github.com/nidi3/domino","docs":null,"changelog":null,"pypi":null,"npm":"domino-ext","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}