console.log()を出力させない。 | phonegap iOS
とりあえず、phonegap.jsで DebugConsoleが定義されているので
if ( true ){
DebugConsole.prototype.log = function(message, maxDepth) {};
DebugConsole.prototype.warn = function(message, maxDepth) {};
DebugConsole.prototype.error = function(message, maxDepth) {};
window.console = new DebugConsole();
}
DebugConsole.prototype.log = function(message, maxDepth) {};
DebugConsole.prototype.warn = function(message, maxDepth) {};
DebugConsole.prototype.error = function(message, maxDepth) {};
window.console = new DebugConsole();
}
こんな感じで上書きするとconsole.logで何もしなくなります。
- Prev リンクをsafariで開く | phonegap iOS
- Next iOSの画像サイズ
- Prev リンクをsafariで開く | phonegap iOS
- Next iOSの画像サイズ