9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
-
+
|
class GrammalecteButton {
constructor (nMenu, xNode) {
this.xNode = xNode;
this.xButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_main_button", textContent: " "});
this.xButton.onclick = () => {
oGrammalecte.parseAndSpellcheck(this.xNode);
oGrammalecte.startGCPanel(this.xNode);
};
this.xButton.style.zIndex = (xNode.style.zIndex.search(/^[0-9]+$/) !== -1) ? (parseInt(xNode.style.zIndex) + 1).toString() : xNode.style.zIndex;
this.bShadow = document.body.createShadowRoot || document.body.attachShadow;
if (this.bShadow) {
this.xShadowBtn = oGrammalecte.createNode("div", {style: "display:none;position:absolute;width:0;height:0;"});
this.xShadowBtnNode = this.xShadowBtn.attachShadow({mode: "open"});
|