Files
headroom/frontend/node_modules/happy-dom/lib/dom-implementation/DOMImplementation.js
Santhosh Janardhanan de2d83092e feat: Reinitialize frontend with SvelteKit and TypeScript
- Delete old Vite+Svelte frontend
- Initialize new SvelteKit project with TypeScript
- Configure Tailwind CSS v4 + DaisyUI
- Implement JWT authentication with auto-refresh
- Create login page with form validation (Zod)
- Add protected route guards
- Update Docker configuration for single-stage build
- Add E2E tests with Playwright (6/11 passing)
- Fix Svelte 5 reactivity with $state() runes

Known issues:
- 5 E2E tests failing (timing/async issues)
- Token refresh implementation needs debugging
- Validation error display timing
2026-02-17 16:19:59 -05:00

50 lines
1.6 KiB
JavaScript

import DocumentType from '../nodes/document-type/DocumentType.js';
import * as PropertySymbol from '../PropertySymbol.js';
import NodeFactory from '../nodes/NodeFactory.js';
/**
* The DOMImplementation interface represents an object providing methods which are not dependent on any particular document. Such an object is returned by the.
*/
export default class DOMImplementation {
#document;
/**
* Constructor.
*
* @param document Document.
*/
constructor(document) {
this.#document = document;
}
/**
* Creates and returns an XML Document.
*
* TODO: Not fully implemented.
*
* @param _namespaceURI Namespace URI.
* @param _qualifiedName Qualified name.
* @param [_docType] Document type.
*/
createDocument(_namespaceURI, _qualifiedName, _docType) {
return new this.#document[PropertySymbol.window].HTMLDocument();
}
/**
* Creates and returns an HTML Document.
*/
createHTMLDocument() {
return new this.#document[PropertySymbol.window].HTMLDocument();
}
/**
* Creates and returns an HTML Document.
*
* @param qualifiedName Qualified name.
* @param publicId Public ID.
* @param systemId System ID.
*/
createDocumentType(qualifiedName, publicId, systemId) {
const documentType = NodeFactory.createNode(this.#document, DocumentType);
documentType[PropertySymbol.name] = qualifiedName;
documentType[PropertySymbol.publicId] = publicId;
documentType[PropertySymbol.systemId] = systemId;
return documentType;
}
}
//# sourceMappingURL=DOMImplementation.js.map