codigo0/node_modules/happy-dom/lib/nodes/attr/Attr.js
planetazuzu 5d7a6500fe refactor: Fase 1 - Clean Architecture, refactorización modular y eliminación de duplicidades
-  Ticket 1.1: Estructura Clean Architecture en backend
-  Ticket 1.2: Schemas Zod compartidos
-  Ticket 1.3: Refactorización drugs.ts (1362 → 8 archivos modulares)
-  Ticket 1.4: Refactorización procedures.ts (3583 → 6 archivos modulares)
-  Ticket 1.5: Eliminación de duplicidades (~50 líneas)

Cambios principales:
- Creada estructura Clean Architecture en backend/src/
- Schemas Zod compartidos en backend/src/shared/schemas/
- Refactorización modular de drugs y procedures
- Utilidades genéricas en src/utils/ (filter, validation)
- Eliminados scripts obsoletos y documentación antigua
- Corregidos errores: QueryClient, import test-error-handling
- Build verificado y funcionando correctamente
2026-01-25 21:09:47 +01:00

103 lines
2.5 KiB
JavaScript

import Node from '../node/Node.js';
import * as PropertySymbol from '../../PropertySymbol.js';
import NodeTypeEnum from '../node/NodeTypeEnum.js';
/**
* Attribute node interface.
*
* Reference: https://developer.mozilla.org/en-US/docs/Web/API/Attr.
*/
export default class Attr extends Node {
[PropertySymbol.nodeType] = NodeTypeEnum.attributeNode;
[PropertySymbol.namespaceURI] = null;
[PropertySymbol.name] = null;
[PropertySymbol.localName] = null;
[PropertySymbol.prefix] = null;
[PropertySymbol.value] = null;
[PropertySymbol.specified] = true;
[PropertySymbol.ownerElement] = null;
/**
* Returns specified.
*
* @deprecated
* @returns Specified.
*/
get specified() {
return this[PropertySymbol.specified];
}
/**
* Returns owner element.
*
* @returns Owner element.
*/
get ownerElement() {
return this[PropertySymbol.ownerElement];
}
/**
* Returns value.
*
* @returns Value.
*/
get value() {
return this[PropertySymbol.value];
}
/**
* Sets value.
*
* @param value Value.
*/
set value(value) {
this[PropertySymbol.value] = value;
}
/**
* Returns name.
*
* @returns Name.
*/
get name() {
return this[PropertySymbol.name] || '';
}
/**
* Returns local name.
*
* @returns Local name.
*/
get localName() {
return this[PropertySymbol.localName] || '';
}
/**
* Returns prefix.
*
* @returns Prefix.
*/
get prefix() {
return this[PropertySymbol.prefix];
}
/**
* @override
*/
get textContent() {
return this[PropertySymbol.value] || '';
}
/**
* Returns namespace URI.
*
* @returns Namespace URI.
*/
get namespaceURI() {
return this[PropertySymbol.namespaceURI];
}
/**
* @override
*/
[PropertySymbol.cloneNode](deep = false) {
const clone = super[PropertySymbol.cloneNode](deep);
clone[PropertySymbol.namespaceURI] = this[PropertySymbol.namespaceURI];
clone[PropertySymbol.name] = this[PropertySymbol.name];
clone[PropertySymbol.localName] = this[PropertySymbol.localName];
clone[PropertySymbol.prefix] = this[PropertySymbol.prefix];
clone[PropertySymbol.value] = this[PropertySymbol.value];
clone[PropertySymbol.specified] = this[PropertySymbol.specified];
return clone;
}
}
//# sourceMappingURL=Attr.js.map