diff options
Diffstat (limited to 'src/runtime.js')
-rw-r--r-- | src/runtime.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/runtime.js b/src/runtime.js index 5e3dcdcc..0674f624 100644 --- a/src/runtime.js +++ b/src/runtime.js @@ -315,6 +315,14 @@ var Runtime = { return ret; }, + warnOnce: function(text) { + if (!warnOnce.shown) warnOnce.shown = {}; + if (!warnOnce.shown[text]) { + warnOnce.shown[text] = 1; + Module.printErr(text); + } + }, + #if RUNTIME_DEBUG debug: true, // Switch to false at runtime to disable logging at the right times |