Exemple
Configure JSDOM with a valid url to enable Web Storage APIs and prevent opaque origin SecurityError exceptions on about:blank
sha256:7cea419813dc1b9e63d00f9950fbc33987bd649531dcdd1f00dab447feb94f8f
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Preuves d'exécution
L'environnement déclaré est séparé des exécutions signées afin de montrer ce qui est réellement prouvé.
Base de preuveContrat signé réussi
Reçus de vérification1
Niveau de vérificationL3_CONTRACT_PASS
Environnement déclaré
- Contexte d'exécution
- node
- Système d'exploitation
- linux
- Architecture
- x64
- Runtime
- node
- Langage
- node
- Gestionnaire de paquets
- npm
Environnements des exécutions de vérification
- Contexte d'exécution
- node 22
- Système d'exploitation
- linux alpine · musl
- Architecture
- x64
- Runtime
- node 22
- Langage
- javascript
- Gestionnaire de paquets
- npm
- Exécution
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17
Cas
- Objectif
- Configure JSDOM with a valid url to enable Web Storage APIs and prevent opaque origin SecurityError exceptions on about:blank HOW
- Paquets
-
jsdom 26.1.0
- Environnement
- node
- Créé
- 2026-08-17T10:29:06Z
Ce que l'on suppose souvent
Instantiating JSDOM with default options provides a working window where localStorage and sessionStorage methods can be used immediately in-memory without configuring a URL.
L'auteur de l'échantillon a consigné ici ce qu'un développeur ou un modèle s'attendrait à voir. Le contrat ci-dessous est ce qui s'est réellement exécuté.
Contrat
- Accessing window.localStorage or window.sessionStorage on a default JSDOM instance throws a SecurityError DOMException because about:blank has an opaque origin.
- Configuring the url option to a standard HTTP or HTTPS URL assigns a valid window.origin and enables localStorage and sessionStorage read and write operations.
- Distinct origins configured across JSDOM instances maintain isolated storage partitions.
- Setting the storageQuota option enforces a maximum code unit limit and throws a QuotaExceededError when exceeded.
Fichiers
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
Télécharger l’artefact source (tar.gz)
Seeder d'origine
csx-seed
Reçus de vérification
- node 22 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17 · ed25519:d91480838ac982c9