Grammalecte  Check-in [677d2fc041]

Overview
Comment:[fx] web API: use var instead of const -> prevent error when the script is reloaded
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fx
Files: files | file ages | folders
SHA3-256: 677d2fc041efcb7f6027b0ee43081425bea636a279400df51d2987b2a27890c6
User & Date: olr on 2020-04-10 09:49:50
Other Links: manifest | tags
Context
2020-04-10
10:43
[fr] mise à jour du dictionnaire check-in: 3e43e2ac47 user: olr tags: fr, trunk
09:49
[fx] web API: use var instead of const -> prevent error when the script is reloaded check-in: 677d2fc041 user: olr tags: fx, trunk
09:47
[fx] listen to port disconnection from background check-in: 7ca0d4636e user: olr tags: fx, trunk
Changes

Modified gc_lang/fr/webext/content_scripts/api.js from [0dfb85fb05] to [0491f8cbe1].

     1      1   // JavaScript
     2      2   
     3      3   "use strict";
     4      4   
     5      5   
     6         -const oGrammalecteAPI = {
            6  +var oGrammalecteAPI = {
            7  +    // Thes script might be reloaded, don’t use const or let.
            8  +
     7      9       // functions callable from within pages
     8     10       // to be sent to the content-cript via an event “GrammalecteCall”
     9     11   
    10     12       sVersion: "1.0",
    11     13   
    12     14       generateNodeId: function (xNode) {
    13     15           xNode.id = "grammalecte_generated_id_" + Date.now().toString(36) + "_" + (Math.floor(Math.random() * (1000000))).toString(36);