Grammalecte  Check-in [acd22b9ea0]

Overview
Comment:[fx] Simple test of previous commit
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fx | webext_sharedworker
Files: files | file ages | folders
SHA3-256: acd22b9ea0d707d13d08677dcb537c5a083bf4aa3ea6f9e79d8468761f3d5e7b
User & Date: IllusionPerdu on 2017-08-11 09:48:15
Other Links: branch diff | manifest | tags
Context
2017-08-11
10:44
[fx] Le SharedWorker ne se partage pas dans toutes les fenêtres... Estce à cause de la bidouille ??? check-in: c262fc885d user: IllusionPerdu tags: fx, webext_sharedworker
09:48
[fx] Simple test of previous commit check-in: acd22b9ea0 user: IllusionPerdu tags: fx, webext_sharedworker
09:27
[fx] Add the possibility to send reply to all or other check-in: d2e1bf16aa user: IllusionPerdu tags: fx, webext_sharedworker
Changes

Modified gc_lang/fr/webext/content_scripts/modify_page.js from [639403006b] to [8eb0661a77].

46
47
48
49
50
51
52




53
54
55
56
57
58
59
        //La frame est chargé on envoie l'initialisation du Sharedworker
        console.log('[Web] Initialise the worker :s');
        console.log('[Web] Domaine ext: '+browser.extension.getURL(""));
        xFrameContent.postMessage({sPath: browser.extension.getURL(""), sPage: location.origin.trim("/")}, browser.extension.getURL(""));
        //Un petit test pour débogage ;)
        console.log('[Web] Test the worker :s');
        xFrameContent.postMessage(["parse", {sText: "Vas... J’en aie mare...", sCountry: "FR", bDebug: false, bContext: false}], browser.extension.getURL(""));




    }
    catch (e) {
        console.error(e);
    }
}
document.body.appendChild(xIframe);








>
>
>
>







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
        //La frame est chargé on envoie l'initialisation du Sharedworker
        console.log('[Web] Initialise the worker :s');
        console.log('[Web] Domaine ext: '+browser.extension.getURL(""));
        xFrameContent.postMessage({sPath: browser.extension.getURL(""), sPage: location.origin.trim("/")}, browser.extension.getURL(""));
        //Un petit test pour débogage ;)
        console.log('[Web] Test the worker :s');
        xFrameContent.postMessage(["parse", {sText: "Vas... J’en aie mare...", sCountry: "FR", bDebug: false, bContext: false}], browser.extension.getURL(""));
        //Un test qui envoie a tout le monde
        xFrameContent.postMessage(["all", {}], browser.extension.getURL(""));
        //Un test qui envoie aux autres
        xFrameContent.postMessage(["other", {}], browser.extension.getURL(""));
    }
    catch (e) {
        console.error(e);
    }
}
document.body.appendChild(xIframe);

Modified gc_lang/fr/webext/gce_sharedworker.js from [b6aa40b101] to [72e7a7fc85].

109
110
111
112
113
114
115








116
117
118
119
120
121
122
                break;
            case "fullTests":
                fullTests();
                break;
            case "getListOfTokens":
                getListOfTokens(oParam.sText);
                break;








            default:
                console.log("Unknown command: " + showError(e.data[0]));
        }
    }
    //xPort.start();
}








>
>
>
>
>
>
>
>







109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
                break;
            case "fullTests":
                fullTests();
                break;
            case "getListOfTokens":
                getListOfTokens(oParam.sText);
                break;
            case "other":
                console.log("Message to Other");
                toReply.Other("Message to Other");
                break;
            case "all":
                console.log("Message to All");
                toReply.All("Message to All");
                break;
            default:
                console.log("Unknown command: " + showError(e.data[0]));
        }
    }
    //xPort.start();
}