mirror of
				https://github.com/avatao-content/frontend-tutorial-framework
				synced 2025-11-04 13:52:55 +00:00 
			
		
		
		
	Enhance URL handling (let -> const)
This commit is contained in:
		@@ -12,7 +12,7 @@ export class TerminadoService {
 | 
			
		||||
    Terminal.applyAddon(fit);
 | 
			
		||||
    Terminal.applyAddon(terminado);
 | 
			
		||||
    this.xterm = new Terminal();
 | 
			
		||||
    let wsproto = (location.protocol === 'https:') ? 'wss://' : 'ws://';
 | 
			
		||||
    const wsproto = (location.protocol === 'https:') ? 'wss://' : 'ws://';
 | 
			
		||||
    this.ws = new WebSocket(wsproto + window.location.host + '/terminal');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -30,7 +30,7 @@ export class WebSocketService {
 | 
			
		||||
    // Using share() causes a single WebSocket to be created when the first
 | 
			
		||||
    // observer subscribes. This socket is shared with subsequent observers
 | 
			
		||||
    // and closed when the observer count falls to zero.
 | 
			
		||||
    let wsproto = (location.protocol === 'https:') ? 'wss://' : 'ws://';
 | 
			
		||||
    const wsproto = (location.protocol === 'https:') ? 'wss://' : 'ws://';
 | 
			
		||||
    this.downlink = jsonWebsocketConnect(
 | 
			
		||||
      wsproto + window.location.host + '/ws',
 | 
			
		||||
      this.uplink = new QueueingSubject<object>()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user