Grammalecte  Diff

Differences From Artifact [4f6823afb1]:

To Artifact [5158e88aeb]:


138
139
140
141
142
143
144
145
146
147
148
149
150
151















152
153
154
155
156
157
158
138
139
140
141
142
143
144







145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166







-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+








    start (what, xResultNode=null) {
        this.oTooltip.hide();
        this.bWorking = false;
        this.clear();
        this.hideMessage();
        this.resetTimer();
        if (typeof(what) === "string" && what === "__ThunderbirdComposeWindow__") {
            // Thunderbird compose window
            this.oTextControl = new HTMLPageEditor(document);
        }
        else if (typeof(what) === "string" || (what.nodeType && what.nodeType === 1)) {
            // Text or node
            this.oTextControl = new TextNodeEditor(what, xResultNode);
        if (typeof(what) === "string") {
            if (what === "__ThunderbirdComposeWindow__") {
                // Thunderbird compose window
                this.oTextControl = new HTMLPageEditor(document);
            } else {
                this.oTextControl = new TextNodeEditor(what, xResultNode);
            }
        }
        else if (what.nodeType && what.nodeType === 1) {
            if (what.tagName == "IFRAME") {
                this.oTextControl = new HTMLPageEditor(what, xResultNode);
            }
            else {
                this.oTextControl = new TextNodeEditor(what, xResultNode);
            }
        }
        else {
            // error
            oGrammalecte.showMessage("[BUG] Analyse d’un élément inconnu…");
            console.log("[Grammalecte] Unknown element:", what);
        }
    }