Open mbujes opened 11 years ago
En vez de mostrar los errores en consola, porqué no mostrarlos como notificaciones?
He usado para ello el plugin de jquery Noty
enlace:
http://kif.arkasoftware.com/threejs/htmleditor
} catch ( error ) {
var lineNumber = error.lineNumber + lineStart; errorLines.push( lineNumber ); editor.setLineClass( lineNumber, null, 'errorLine' ); var string= 'Line ' + ( lineNumber + 1 ) + ': ' + error.string; console.log( string); notty = window.noty({text: string, closeWith: ['click'], layout:'bottomRight',type:'error', dismissQueue: true,force: true}); } // console.log( errors ); if (errorLines.length==0){ $.noty.closeAll() notty = window.noty({text: "OK. No errors detected", closeWith: ['click'], layout:'bottomRight',type:'success',timeout:5000, dismissQueue: true,force: true}); } return errorLines.length === 0; };
La idea era ponerlos en la misma linea en el codigo. Pero no se como implementarlo aun.
En vez de mostrar los errores en consola, porqué no mostrarlos como notificaciones?
He usado para ello el plugin de jquery Noty
enlace:
http://kif.arkasoftware.com/threejs/htmleditor
} catch ( error ) {