[Firefox addon] Replace a bind(this) statement with an arrow function in PdfStreamConverter.jsm (issue 8343)
				
					
				
			Please note that I used the addon debugger to set a breakpoint in the `unload` function, in order to ensure that `this` still correctly refers to the `FindEventManager` scope.
This commit is contained in:
		
							parent
							
								
									00d67371ec
								
							
						
					
					
						commit
						8e976d7110
					
				@ -804,10 +804,10 @@ class FindEventManager {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  bind() {
 | 
					  bind() {
 | 
				
			||||||
    var unload = function(e) {
 | 
					    var unload = (evt) => {
 | 
				
			||||||
      this.unbind();
 | 
					      this.unbind();
 | 
				
			||||||
      this.contentWindow.removeEventListener(e.type, unload);
 | 
					      this.contentWindow.removeEventListener(evt.type, unload);
 | 
				
			||||||
    }.bind(this);
 | 
					    };
 | 
				
			||||||
    this.contentWindow.addEventListener("unload", unload);
 | 
					    this.contentWindow.addEventListener("unload", unload);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // We cannot directly attach listeners to for the find events
 | 
					    // We cannot directly attach listeners to for the find events
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user