Example #1
0
File: component.js Project: go/ui
 socket.onmessage = (message) => {
   set(this,'status', 'connected');
   this.sendAction('connected');
   const data = message.data.slice(1);
   switch (message.data[0]) {
     case '1':
     case '2':
     case '3':
       term.write(decodeURIComponent(window.escape(AWS.util.base64.decode(data))));
       break;
   }
 };
Example #2
0
 socket.onmessage = (message) => {
   this.set('status','connected');
   this.sendAction('connected');
   //console.log('From Server:',message.data);
   term.write(decodeURIComponent(escape(atob(message.data))));// jshint ignore:line
 };