Wrap undo/redo in an operation
[htmlmixed mode] support for x-javascript and x-ecmascript script types
Remove reference to buildLineWidget

It was still being called for showIfHidden widgets, even though it no longer exists.

Closes #1225
Fix delayed firing of event handlers

The mechanism that was supposed to batch handlers during an operation and
fire them afterwards was broken -- handlers triggered during endOperation were
fired immediately.

Should be better now.

Closes #1226
Update the docs to match the current default of 10 for viewportMargin.