hterm: paste fix

Partial revert of incorrect change in CL:1816330

The ClipboardEvent is received by scrollport, but
it does not send the actual ClipboardEvent via
pubsub to terminal when it sends a 'paste' event.
It sends a record {text: string} in
hterm.ScrollPort.prototype.onPaste_.

Change-Id: I8ac1d55ae48ead4ec5c772957295ac8bf36fc255
Reviewed-on: https://chromium-review.googlesource.com/c/apps/libapps/+/1826060
Reviewed-by: Joel Hockey <joelhockey@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Joel Hockey <joelhockey@chromium.org>
diff --git a/hterm/js/hterm_terminal.js b/hterm/js/hterm_terminal.js
index ac9abf0..667c4a9 100644
--- a/hterm/js/hterm_terminal.js
+++ b/hterm/js/hterm_terminal.js
@@ -3728,10 +3728,10 @@
 /**
  * React when text is pasted into the scrollPort.
  *
- * @param {!ClipboardEvent} e The DOM paste event to handle.
+ * @param {{text: string}} e The text of the paste event to handle.
  */
 hterm.Terminal.prototype.onPaste_ = function(e) {
-  var data = e.clipboardData.getData('text').replace(/\n/mg, '\r');
+  var data = e.text.replace(/\n/mg, '\r');
   if (this.options_.bracketedPaste) {
     // We strip out most escape sequences as they can cause issues (like
     // inserting an \x1b[201~ midstream).  We pass through whitespace