Overview
| Comment: | [fx] rename variables: ShadowHost and ShadowRoot |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk | fx |
| Files: | files | file ages | folders |
| SHA3-256: |
f6a0d24f4bf1db3caaf5f495712b05e4 |
| User & Date: | olr on 2020-04-30 05:48:07 |
| Original Comment: | [fr] rename variables: ShadowHost and ShadowRoot |
| Other Links: | manifest | tags |
Context
|
2020-04-30
| ||
| 10:23 | [fr] ajustements check-in: d0988a4706 user: olr tags: trunk, fr | |
| 05:48 | [fx] rename variables: ShadowHost and ShadowRoot check-in: f6a0d24f4b user: olr tags: trunk, fx | |
| 00:08 | [fx] fix confusion between ShadowHost and ShadowRoot check-in: 8e9c0e9371 user: olr tags: trunk, fx | |
Changes
Modified gc_lang/fr/webext/content_scripts/menu.js from [4011ec8d5e] to [0f0dc58ca4].
| ︙ | ︙ | |||
88 89 90 91 92 93 94 |
this.xButton.style.left = `${oCoord.left}px`;
}
}
insertIntoPage () {
this.bShadow = document.body.createShadowRoot || document.body.attachShadow;
if (this.bShadow) {
| | | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
this.xButton.style.left = `${oCoord.left}px`;
}
}
insertIntoPage () {
this.bShadow = document.body.createShadowRoot || document.body.attachShadow;
if (this.bShadow) {
this.xShadowHost = oGrammalecte.createNode("div", { id: "grammalecte_menu_main_button_shadow_host", style: "width:0; height:0;" });
this.xShadowRoot = this.xShadowHost.attachShadow({ mode: "open" });
oGrammalecte.createStyle("content_scripts/menu.css", null, this.xShadowRoot);
this.xShadowRoot.appendChild(this.xButton);
document.body.appendChild(this.xShadowHost);
}
else {
if (!document.getElementById("grammalecte_cssmenu")) {
|
| ︙ | ︙ |
Modified gc_lang/fr/webext/content_scripts/message_box.js from [bb68749e64] to [8958174d47].
| ︙ | ︙ | |||
11 12 13 14 15 16 17 |
class GrammalecteMessageBox {
constructor (sId, sTitle) {
this.sId = sId;
this.bShadow = document.body.createShadowRoot || document.body.attachShadow;
if (this.bShadow) {
| | | | | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
class GrammalecteMessageBox {
constructor (sId, sTitle) {
this.sId = sId;
this.bShadow = document.body.createShadowRoot || document.body.attachShadow;
if (this.bShadow) {
this.xShadowHost = oGrammalecte.createNode("div", {id: this.sId+"_shadow", style: "width:0;height:0;"});
this.xShadowRoot = this.xShadowHost.attachShadow({mode: "open"});
this.xParent = this.xShadowRoot;
} else {
this.xParent = document;
}
this.xMessageBoxBar = oGrammalecte.createNode("div", {className: "grammalecte_message_box_bar"});
this.xMessageBoxContent = oGrammalecte.createNode("div", {className: "grammalecte_message_box_content"});
this.xMessageBox = this._createPanel(sTitle);
|
| ︙ | ︙ | |||
61 62 63 64 65 66 67 |
let xButton = oGrammalecte.createNode("div", {className: "grammalecte_panel_button grammalecte_close_button", textContent: "×", title: "Fermer la fenêtre"});
xButton.onclick = function () { this.hide(); }.bind(this); // better than writing “let that = this;” before the function?
return xButton;
}
insertIntoPage () {
if (this.bShadow){
| | | | | | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
let xButton = oGrammalecte.createNode("div", {className: "grammalecte_panel_button grammalecte_close_button", textContent: "×", title: "Fermer la fenêtre"});
xButton.onclick = function () { this.hide(); }.bind(this); // better than writing “let that = this;” before the function?
return xButton;
}
insertIntoPage () {
if (this.bShadow){
oGrammalecte.createStyle("content_scripts/panel.css", null, this.xShadowRoot);
oGrammalecte.createStyle("content_scripts/message_box.css", null, this.xShadowRoot);
this.xShadowRoot.appendChild(this.xMessageBox);
document.body.appendChild(this.xShadowHost);
} else {
if (!document.getElementById("grammalecte_cssmsg")){
oGrammalecte.createStyle("content_scripts/panel.css", null, document.head);
oGrammalecte.createStyle("content_scripts/message_box.css", "grammalecte_cssmsg", document.head);
}
document.body.appendChild(this.xMessageBox);
}
|
| ︙ | ︙ |
Modified gc_lang/fr/webext/content_scripts/panel.js from [8de62f65f5] to [647c8a603c].
| ︙ | ︙ | |||
20 21 22 23 24 25 26 |
this.nPositionX = 2;
this.nPositionY = 2;
this.bOpened = false;
this.bWorking = false;
this.bShadow = document.body.createShadowRoot || document.body.attachShadow;
if (this.bShadow) {
| | | | | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
this.nPositionX = 2;
this.nPositionY = 2;
this.bOpened = false;
this.bWorking = false;
this.bShadow = document.body.createShadowRoot || document.body.attachShadow;
if (this.bShadow) {
this.xShadowHost = oGrammalecte.createNode("div", {id: this.sId+"_shadow_host", style: "width:0;height:0;"});
this.xShadowRoot = this.xShadowHost.attachShadow({mode: "open"});
this.xParent = this.xShadowRoot;
} else {
this.xParent = document;
}
this.xPanelBar = oGrammalecte.createNode("div", {className: "grammalecte_panel_bar"});
this.xPanelContent = oGrammalecte.createNode("div", {className: "grammalecte_panel_content"});
this.xWaitIcon = this._createWaitIcon();
|
| ︙ | ︙ | |||
120 121 122 123 124 125 126 |
this.xPanelMessageActionButton = oGrammalecte.createNode("div", {id: "grammalecte_panel_message_action_button"});
this.xPanelMessageBlock.appendChild(this.xPanelMessage);
this.xPanelMessageBlock.appendChild(this.xPanelMessageActionButton);
}
insertIntoPage () {
if (this.bShadow) {
| | | | | | | | | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
this.xPanelMessageActionButton = oGrammalecte.createNode("div", {id: "grammalecte_panel_message_action_button"});
this.xPanelMessageBlock.appendChild(this.xPanelMessage);
this.xPanelMessageBlock.appendChild(this.xPanelMessageActionButton);
}
insertIntoPage () {
if (this.bShadow) {
oGrammalecte.createStyle("content_scripts/panel.css", null, this.xShadowRoot);
oGrammalecte.createStyle("content_scripts/panel_gc.css", null, this.xShadowRoot);
oGrammalecte.createStyle("content_scripts/panel_lxg.css", null, this.xShadowRoot);
oGrammalecte.createStyle("content_scripts/panel_conj.css", null, this.xShadowRoot);
oGrammalecte.createStyle("content_scripts/panel_tf.css", null, this.xShadowRoot);
this.xShadowRoot.appendChild(this.xPanel);
document.body.appendChild(this.xShadowHost);
} else {
if (!document.getElementById("grammalecte_csspanel")) {
oGrammalecte.createStyle("content_scripts/panel.css", "grammalecte_csspanel", document.head);
oGrammalecte.createStyle("content_scripts/panel_gc.css", null, document.head);
oGrammalecte.createStyle("content_scripts/panel_lxg.css", null, document.head);
oGrammalecte.createStyle("content_scripts/panel_conj.css", null, document.head);
oGrammalecte.createStyle("content_scripts/panel_tf.css", null, document.head);
|
| ︙ | ︙ |