Hi,
Replay the script with Advanced logging.
Then, try to look for Javascript errors or warnings before TypeError: document.implementation.
It should be something like : "error: Javascript parsing of ... failed".
Now, if you know how to alter your application in order for LR Javascript parsing to work, make neccessary changes.
If not, file a support case.