function testNewWindow() {
  var webview = document.createElement('webview');
  webview.addEventListener('newwindow', function(e) {
    e.preventDefault();
    var newwebview = document.createElement('webview');
    newwebview.addEventListener('loadstop', function(evt) {
      // If the new window finishes loading, the test is successful.
      embedder.test.succeed();
    });
    document.body.appendChild(newwebview);
    // Attach the new window to the new <webview>.
    e.window.attach(newwebview);
  });
  webview.setAttribute('src', embedder.windowOpenGuestURL);
  document.body.appendChild(webview);
}
// This test verifies that new window attachment functions as expected.
This test verifies that new window attachment functions as expected.
This test verifies that new window attachment functions as expected .
function testNewWindow() {
  var webview = document.createElement('webview');
  webview.addEventListener('newwindow', function(e) {
    e.preventDefault();
    var newwebview = document.createElement('webview');
    newwebview.addEventListener('loadstop', function(evt) {
      embedder.test.succeed();
    });
    document.body.appendChild(newwebview);
    e.window.attach(newwebview);
  });
  webview.setAttribute('src', embedder.windowOpenGuestURL);
  document.body.appendChild(webview);
}
function testNewWindow ( ) { var webview = document . createElement ( 'webview' ) ; webview . addEventListener ( 'newwindow' , function ( e ) { e . preventDefault ( ) ; var newwebview = document . createElement ( 'webview' ) ; newwebview . addEventListener ( 'loadstop' , function ( evt ) { embedder . test . succeed ( ) ; } ) ; document . body . appendChild ( newwebview ) ; e . window . attach ( newwebview ) ; } ) ; webview . setAttribute ( 'src' , embedder . windowOpenGuestURL ) ; document . body . appendChild ( webview ) ; }
This test verifies that new window attachment functions as expected.
This test verifies that new window attachment functions as expected .
// If the new window finishes loading, the test is successful. // Attach the new window to the new <webview>.