JavaScript in 17.1.2

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 undefined 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 jshint.com

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.

Discussion (2)

I care, cause its causing havoc in chrome. is there a way to stop/disable document.write

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.

Discussions have been disabled for this post