Set documentFragment.style to empty object (#1471)

Remove `style` getter and setter in `documentFragment`
This commit is contained in:
ylemkimon
2018-07-12 00:09:42 +09:00
committed by Erik Demaine
parent db585fae54
commit 35aece7763

View File

@@ -246,6 +246,7 @@ class documentFragment implements HtmlDomNode {
height: number;
depth: number;
maxFontSize: number;
style: CssStyle; // Never used; needed for satisfying interface.
constructor(children?: HtmlDomNode[]) {
this.children = children || [];
@@ -253,6 +254,7 @@ class documentFragment implements HtmlDomNode {
this.height = 0;
this.depth = 0;
this.maxFontSize = 0;
this.style = {};
}
hasClass(className: string): boolean {
@@ -263,14 +265,6 @@ class documentFragment implements HtmlDomNode {
return false;
}
get style(): CssStyle {
throw new Error('DocumentFragment does not support style.');
}
set style(_: CssStyle) {
throw new Error('DocumentFragment does not support style.');
}
/**
* Convert the fragment into a node
*/