JavaScript in 17.1.2

approg Community Member Posts: 258 ♪ Opening Act ♪
Perhaps you might consider updating/correcting Lectora's JavaScript to be consistent with what's usually expected today. For example:
  • end lines with a semi colon
  • use "[]" instead of "new Array()"
  • don't create lines of non-minified code that are longer than about 80 characters
  • don't use <!--  and // --> they haven't been needed since last century.
  • don't use document.write use something like createElement/appendChild instead
  • validate the JavaScript with lint. I like JSHint from
As an aside doing things like writing all HTML elements in lower case would also help debugging.

Also still having framesets in SCORM published titles is a disappointment.

I realise that most Lectora users don't care about the things I've mentioned but they would if they realised that at least some of the flakiness they see in Lectora is caused by them.


  • jparker1694
    jparker1694 Community Member Posts: 8
    I care, cause its causing havoc in chrome. is there a way to stop/disable document.write
  • approg
    approg Community Member Posts: 258 ♪ Opening Act ♪
    Don't know. You could try adding document.write = function() { return false; }; to the top of a Lectora js file.

    I believe if you disable document.write then Lectora titles can't run.