mframejs
Version:
simple framework
45 lines (31 loc) • 779 B
text/typescript
// holds the attibutes classes
const attribute = new Map();
/**
* keeps track of the attributes, so I know when parsing the html
*
*/
export class ContainerAttributes {
/**
* register new attribute
*
*/
public static regAttribute(_class: any, name: string): void {
if (!attribute.has(name)) {
attribute.set(name, _class);
}
if (!attribute.has(name)) {
attribute.set(name, _class);
}
}
/**
* returns attibute if found
*
*/
public static findAttribute(name: string): any | null {
if (attribute.has(name)) {
return attribute.get(name);
} else {
return null;
}
}
}