mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-10 21:48:41 +00:00
Set documentFragment.style
to empty object (#1471)
Remove `style` getter and setter in `documentFragment`
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user