websetup/ts/websetup.classes.tag.opengraphtag.ts

12 lines
375 B
TypeScript
Raw Normal View History

2020-11-04 18:01:04 +00:00
import { Tag } from './websetup.classes.tag';
export class OpengraphTag extends Tag {
constructor(propertyNameArg: string, contentArg: string) {
super();
const openGraphElement = document.createElement('meta');
openGraphElement.setAttribute('property', propertyNameArg);
openGraphElement.content = contentArg;
this.elementRef = openGraphElement;
}
}