Overview
| Comment: | [graphspell] get rid of console.log() substitutes, assuming now default console is available from everywhere |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk | graphspell |
| Files: | files | file ages | folders |
| SHA3-256: |
1a3885282aec0d061c19621e2c0972fb |
| User & Date: | olr on 2018-08-07 08:27:20 |
| Original Comment: | [graphspell][core][fx][tb][js] get rid of console.log() substitutes, assuming now default console is available from everywhere (eh, print now works as expected in JS! The JS pile of shit is decreasing a little) |
| Other Links: | manifest | tags |
Context
|
2018-08-07
| ||
| 08:44 | [tb][bug] lexicon editor: test if node exists check-in: 51443597ef user: olr tags: trunk, tb | |
| 08:27 | [graphspell] get rid of console.log() substitutes, assuming now default console is available from everywhere check-in: 1a3885282a user: olr tags: trunk, graphspell | |
| 08:09 | [graphspell][core][fx][tb][js] get rid of console.log() substitutes, assuming now default console is available from everywhere (eh, print now works as expected in JS! The JS pile of shit is decreasing a little) check-in: 8e5a2f5900 user: olr tags: trunk, core, tb, fx, graphspell | |
Changes
Modified graphspell-js/helpers.js from [4f9104fefe] to [dded3e5e90].
| ︙ | ︙ | |||
10 11 12 13 14 15 16 |
inspect: function (o) {
let sMsg = "__inspect__: " + typeof o;
for (let sParam in o) {
sMsg += "\n" + sParam + ": " + o.sParam;
}
sMsg += "\n" + JSON.stringify(o) + "\n__end__";
| | | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
inspect: function (o) {
let sMsg = "__inspect__: " + typeof o;
for (let sParam in o) {
sMsg += "\n" + sParam + ": " + o.sParam;
}
sMsg += "\n" + JSON.stringify(o) + "\n__end__";
console.log(sMsg);
},
loadFile: function (spf) {
// load ressources in workers (suggested by Mozilla extensions reviewers)
// for more options have a look here: https://gist.github.com/Noitidart/ec1e6b9a593ec7e3efed
// if not in workers, use sdk/data.load() instead
try {
let xRequest;
xRequest = new XMLHttpRequest();
xRequest.open('GET', spf, false); // 3rd arg is false for synchronous, sync is acceptable in workers
xRequest.overrideMimeType('text/json');
xRequest.send();
return xRequest.responseText;
}
catch (e) {
console.error(e);
return null;
}
},
// conversions
objectToMap: function (obj) {
if (obj == null) {
|
| ︙ | ︙ |