pax_global_header00006660000000000000000000000064143364006270014517gustar00rootroot0000000000000052 comment=22f7c3c51829a6f14387f7a99e5cdf087f72e685 jsdom-20.0.3/000077500000000000000000000000001433640062700127155ustar00rootroot00000000000000jsdom-20.0.3/.editorconfig000066400000000000000000000002231433640062700153670ustar00rootroot00000000000000root = true [*] end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true charset = utf-8 indent_style = space indent_size = 2 jsdom-20.0.3/.eslintignore000066400000000000000000000013601433640062700154200ustar00rootroot00000000000000node_modules benchmark/browser-bundle.js benchmark/browser-runner.html test/worker-bundle.js lib/jsdom/browser/default-stylesheet.js lib/jsdom/level3/xpath.js lib/jsdom/living/generated/** test/*.js !test/chai-helpers.js !test/karma* !test/util.js test/api/fixtures test/jquery-fixtures test/to-port-to-wpts/files test/to-port-to-wpts/frame.js test/to-port-to-wpts/level1 test/to-port-to-wpts/level2 test/to-port-to-wpts/level3 test/to-port-to-wpts/script.js test/web-platform-tests/tests test/web-platform-tests/to-upstream/dom/nodes/Document-createComment-createTextNode.js test/web-platform-tests/to-upstream/svg/element-svg.html test/web-platform-tests/to-upstream/svg/svgstringlist.html test/web-platform-tests/to-upstream/**/*dont-upstream* jsdom-20.0.3/.eslintrc.json000066400000000000000000000041031433640062700155070ustar00rootroot00000000000000{ "root": true, "extends": "@domenic", "env": { "node": true }, "plugins": [ "jsdom-internal" ], "rules": { // Overrides for jsdom "array-element-newline": "off", "no-implied-eval": "off", "no-invalid-this": "off", "require-unicode-regexp": "off", "prefer-template": "off", "prefer-object-has-own": "off", // remove this once Node v16 is the minimum "logical-assignment-operators": "off", // remove this once Node v16 is the minimum "new-cap": ["error", { "capIsNewExceptions": ["ByteString", "USVString", "DOMString"] }], // Custom rules "jsdom-internal/hook-super-invocation": ["error", { "ancestor": "NodeImpl", "hook": "_attach" }, { "ancestor": "NodeImpl", "hook": "_detach" }, { "ancestor": "NodeImpl", "hook": "_descendantAdded" }, { "ancestor": "NodeImpl", "hook": "_descendantRemoved" }, { "ancestor": "NodeImpl", "hook": "_childTextContentChangeSteps" }, { "ancestor": "ElementImpl", "hook": "_attrModified" } ] }, // Rules limited to specific locations "overrides": [ { "files": ["lib/**"], "rules": { "no-restricted-properties": ["error", { "property": "getAttribute", "message": "Use 'getAttributeNS' with null as the namespace to access attributes within jsdom" }, { "property": "setAttribute", "message": "Use 'setAttributeNS' with null as the namespace to access attributes within jsdom" }, { "property": "hasAttribute", "message": "Use 'hasAttributeNS' with null as the namespace to access attributes within jsdom" }, { "property": "removeAttribute", "message": "Use 'removeAttributeNS' with null as the namespace to access attributes within jsdom" }, { "property": "toggleAttribute", "message": "Use 'setAttributeNS' and 'removeAttributeNS' with null as the namespace to access attributes within jsdom" } ] } }, { "files": ["test/api/**"], "rules": { "no-loop-func": "off" // interacts poorly with Mocha's before() and tests generated using loops } } ] } jsdom-20.0.3/.gitattributes000066400000000000000000000000611433640062700156050ustar00rootroot00000000000000# tests require lf line endings *.js text eol=lf jsdom-20.0.3/.github/000077500000000000000000000000001433640062700142555ustar00rootroot00000000000000jsdom-20.0.3/.github/ISSUE_TEMPLATE.md000066400000000000000000000021211433640062700167560ustar00rootroot00000000000000### Basic info: - **Node.js version:** - **jsdom version:** ### Minimal reproduction case ```js const { JSDOM } = require("jsdom"); const options = { ... your options here ... }; const dom = new JSDOM(` ... your HTML here ... `, options); ... your code that reproduces the problem here, probably using dom.window ... ``` ### How does similar code behave in browsers? (Link to a jsbin or similar strongly suggested.) jsdom-20.0.3/.github/workflows/000077500000000000000000000000001433640062700163125ustar00rootroot00000000000000jsdom-20.0.3/.github/workflows/jsdom-ci.yml000066400000000000000000000054731433640062700205530ustar00rootroot00000000000000# This workflow will do a clean install of node dependencies, build the source code and # run tests across different versions of node # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions name: JSDOM-CI on: push: branches: - master pull_request: branches: - master permissions: contents: read jobs: lint: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 with: submodules: 'recursive' - name: Run linter uses: actions/setup-node@v3 with: node-version: '18' - name: Install dependencies run: yarn --frozen-lockfile - name: Run syntax rules check with ESLint run: yarn lint build-with-canvas: env: TEST_SUITE: 'node-canvas' runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 with: submodules: 'recursive' - name: Run Canvas tests with Node 18 uses: actions/setup-node@v3 with: node-version: '18' - name: Install required image manipulation packages with APT run: sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev - name: Setup HOSTS file for Web Platform Test server run: ./test/web-platform-tests/tests/wpt make-hosts-file | sudo tee -a /etc/hosts - name: Install dependencies run: yarn --frozen-lockfile - name: Run tests run: yarn add canvas && yarn test --retries 1 build-with-browser: env: TEST_SUITE: 'browser' runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 with: submodules: 'recursive' - name: Run web browser tests uses: actions/setup-node@v3 with: node-version: '18' - name: Setup HOSTS file for Web Platform Test server run: ./test/web-platform-tests/tests/wpt make-hosts-file | sudo tee -a /etc/hosts - name: Install dependencies run: yarn --frozen-lockfile - name: Run tests run: yarn test-browser build: runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: node-version: - 14 - 16 - 18 architecture: - x64 steps: - uses: actions/checkout@v3 with: submodules: 'recursive' - name: Run tests with Node ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} architecture: ${{ matrix.architecture }} - name: Setup HOSTS file for Web Platform Test server run: ./test/web-platform-tests/tests/wpt make-hosts-file | sudo tee -a /etc/hosts - name: Install dependencies run: yarn --frozen-lockfile - name: Run tests run: yarn test --retries 1 jsdom-20.0.3/.gitignore000066400000000000000000000004051433640062700147040ustar00rootroot00000000000000.DS_Store .svn .*.swp .eslintcache gmon.out v8.log node_modules package-lock.json test/worker-bundle.js test/web-platform-tests/tuwpt-manifest.json npm-debug.log* benchmark/browser-bundle.js lib/jsdom/living/generated/**/*.js lib/jsdom/browser/js-globals.json jsdom-20.0.3/.gitmodules000066400000000000000000000002071433640062700150710ustar00rootroot00000000000000[submodule "test/web-platform-tests/tests"] path = test/web-platform-tests/tests url = https://github.com/web-platform-tests/wpt.git jsdom-20.0.3/.mailmap000066400000000000000000000025061433640062700143410ustar00rootroot00000000000000Elijah Insua Brandon Paton Domenic Denicola Felix Gnass Felix Gnass Joris van der Wel Jos Shepherd Karuna Sagar Mariusz Nowak Nicolas LaCasse Nicolas LaCasse Robin ulteriorlife Ivan Nikulin Jeff Carpenter Sebastian Mayr Sebastian Mayr Sebastian Mayr Sebastian Mayr Pierre-Marie Dartus Martin Naumann Christoph Pojer Michał Gołębiowski-Owczarek Jesus David Garcia Gomez Magne Andersson jsdom-20.0.3/.npmignore000066400000000000000000000000311433640062700147060ustar00rootroot00000000000000/* !lib/ lib/**/*.webidl jsdom-20.0.3/AUTHORS.txt000066400000000000000000000304531433640062700146100ustar00rootroot00000000000000Adam Faulkner Adrian Lang Adrian Makowski Agostino Cavarero airportyh alec Aleksei Tsikov Alex Coles Alex Pearson Alex Rattray Alex Soncodi Alexander Flatter Alexis CHAPPRON Alistair Brown Alistair MacDonald Alvaro Dias Ammar Khaku Anant Patni Andrea Bogazzi Andreas Fleig Andreas Lind Andreas Lind Petersen andrew morton Andrew Patton Andrew Plummer Andrew Smith Andy VanWagoner Anton Popov Anton Yefremov antonj Aria Stewart Arrix Aryan Arora Avery Fay Avi Deitcher Avi Vahl Behind The Math Ben Gilbert Bernd Hacker Brandon Bethke Brandon Paton Brendan Abbott Brian Donovan Brian Maissy Brian McDaniel Brian Peacock Carlos Serrano Chad Walker Chris Buckley Chris Carpita Chris Hughes Chris Richard Christian Bewernitz Christof Marti Christoph Pojer Christophe Coevoet cjroebuck Connor Meredith <4907463+connormeredith@users.noreply.github.com> Cyril Auburtin daishi Damian Janowski Damien Rajon <145502+pyrho@users.noreply.github.com> Dan Lidral-Porter Daniel Boelzle [:dbo] Daniel Cassidy Daniel Cousens Daniël van de Burgt d-ash Dav Glass Dave Clark Dave Methvin Davide P. Cervone Derek Lindahl Domenic Denicola Dominic Gannaway dxgriffiths Dylan Marriott Edward O'Connor Edward Pfremmer Edwin Shin eiko eleith Elijah Insua E̵̘̳̘̝ṃ̟͈͙̗̹͘i͖͇ḷ͚͔̱̰̠y͜ ̩̲͕R̮̜͓̫o͉̣̦̘̖̖ͅs̫̣͜e̼͖̹̩͉͉͠ Enver Balalic Erik Vold Eugene Ware Evan Haas Evan Jacobs Evan Jones ExE Boss <3889017+ExE-Boss@users.noreply.github.com> fdesforges Federico Galassi fegs Felix <188768+fb55@users.noreply.github.com> Felix Böhm Felix Gnass Flaviu Tamas Florent Forbes Lindesay fr0z3nk0 Francis Saul Francisco Requena Frazer Smith Frederic Hemberger FrozenCow Fumiaki MATSUSHIMA Futtetennista Gary Court Gianluca Guarini Godmar Back Gord Tanner Grant Gryczan gregory80 Haz Henrik Giesel Henry Zhu hij1nx i8-pi Ian Young Ikko Ashimine indexzero isaacs isonmad Ivan Nikulin Jack James Broad James Kyle James McMath James Treworgy Jameson Little Jamie Liu Jared Deckard Jason Davies Jason Orendorff Jason Palmer Jason Priestley jden Jean-Francois Remy Jeff Carpenter Jeremy Danyow Jérémy Lal Jerry Sievert Jesus David Garcia Gomez Jimmy Mabey Joe Lencioni Johan Sköld John Hurliman John Nguyen John Roberts Jon Sakas Jonathan Commins Jonathan Ong Joris van der Wel Jörn Hees Jos Shepherd Joscha Feth José Valim Joseph Frazier <1212jtraceur@gmail.com> Josh Marshall Joshua Peek JuFeng Zhang Julien Guimont Jürg Lehni justinmchase Juzer Zarif Kai kangax Karel Bruneel <1569717+kbruneel@users.noreply.github.com> Karl Horky Karl Norling Karuna Sagar Kasper Isager kblomquist Ken "Elf" Mathieu Sternberg Kenneth Powers Kevin Gibbons Kevin Raynel King Koopa Konto Mondo kontomondo Koushik Challa Krystan Honour Kuriyama hibiya Kyle Kyle McFarland Kyle Rose Lauri Heiskanen liucougar Lon Ingram Louis-Dominique Dubeau lovebear Lucian Buzzo Ludovico Fischer Luis Silva Lukas Bünger lul-odoo Magne Andersson makana Manuel Lopez Marak Squires Marc-Andre Lafortune Mariusz Nowak Martin Naumann Matt Broadstone Matthew Crinklaw-Vogt Matthew Glazar Matthew Goldberg Matthew King Matthew Molloy Matthew Pflueger Matthew Phillips Mattias Buelens <649348+MattiasBuelens@users.noreply.github.com> Max Walker Maxim Vorobjov Michael Best Michael Fleet Michael Hayes Michael Mior Michael Orchard Michał Gołębiowski-Owczarek Michał Wadas Mike Bostock Mike Schreifels Mitar Nao Iizuka Nick McCurdy Nick Oliver Nick Stenning Nicklas Gummesson Nicolas HENRY Nicolas LaCasse Nik Nyby ninevra Ojek Olivier El Mekki Ondřej Žára Onur Yıldırım Pascal Bayer Paul O’Shannessy peller Pepijn Verlaan Pete Bevin Péter Peter Lyons Phil Dokas Philipp Fritsche Philippe Ozil <5071767+pozil@users.noreply.github.com> Pierre-Marie Dartus Rafał Chłodnicki Rainer Eli Ralph Holzmann Ra'Shaun Stovall Ra'Shaun Stovall Remy Loubradou reviewher <24845478+reviewher@users.noreply.github.com> Rich Harris Ricky Chien Ricordisamoa Rob Dodson Robin Robin Berjon Rodrigo Flores Rolf Timmermans Romain Trotard Ronald Rey Rondinelly Russell Bicknell Ryan Gasparini Ryan Grove Ryan Seddon Ryan T Ryan Wolf S Sesha Sendhil Salvatore Porchia Sam Ruby Sammy Jelin Samori Gorse saucy Scott Albertine Scott Ashton Sean Jacke Sebastiaan Marynissen Sebastian Mayr Sebastian McKenzie Sebastian Silbermann Sébastien Doeraene Sergei Ianovich Shimon Doodkin Silvio Tomatis Simen Bekkhus Simon Müller Simon Weimann sonnym Soufiane Ghzal sporchia Stefan Buck Stephen Bannasch sterpe steve Steve Conover Sven Müller Swizec Teller Thiago Hirata Thomas Chung Tiago Rodrigues Timothy Gu timu Tobie Tom Hudson Tom Jenkinson Tom Taylor ulteriorlife Vadim Baryshev Vegard B. Bugge Vincent Desjardins Vincent Siao VinothKumar Raman vsemozhetbyt Vytautas Jakutis waslogic Wei Dai William Cunningham Xavi Yonathan ytetsuro Yun Cui Yunlei Liu Zach Bjornson Zach Smith jsdom-20.0.3/Changelog.md000066400000000000000000004416501433640062700151400ustar00rootroot00000000000000# jsdom Changelog ## 20.0.3 * Updated dependencies, notably `w3c-xmlserializer`, which fixes using `DOMParser` on XML documents containing emoji. ## 20.0.2 * Fixed `xhr.abort()` to no longer give an exception when the constructed `XMLHttpRequest` was invalid. (whamtet) * Fixed `event.getModifierState()` on `MouseEvent` and `KeyboardEvent` instances to properly consult the `ctrlKey`, `altKey`, `metaKey`, and `shiftKey` properties of the event. (juzerzarif) * Fixed custom element creation to not be affected by any modifications to the `window.customElements` property. (bicknellr) ## 20.0.1 * Improved the performance of appending `