setupWebViewPanel = function () {
      // Prepare the panel:
      // Set the panel size and
      // initialize the webview and load the URL
      var frame = NSMakeRect(0, 0, 320, 480);
      var webView = WebView.alloc()
      .initWithFrame(frame);
      var webViewFrame = webView.mainFrame();

      // The FrameLoadDelegate offers the webView_didFinishLoadForFrame
      // method which is called when the web page is loaded.
      // !!! The methods never fire because:
      // - it is implemented wrong?
      // - the delegate's method never is called because the script ends before the
      //   page is loaded?
      var loadDelegate = new WebViewLoadDelegate();
      webView.setFrameLoadDelegate(loadDelegate);

      webViewFrame.loadRequest(NSURLRequest.requestWithURL(NSURL.URLWithString(URL)));

      // Set up the panel window
      var mask = NSTitledWindowMask + NSClosableWindowMask + NSMiniaturizableWindowMask + NSUtilityWindowMask;
      var panel = NSPanel.alloc()
      .initWithContentRect_styleMask_backing_defer(frame, mask, NSBackingStoreBuffered, true);

      // Add the webView to the prepared panel
      panel.contentView()
      .addSubview(webView);

      // Show the panel
      panel.makeKeyAndOrderFront(panel);

      // persist the panel and the webView.
      persist.set('panel', panel);
      persist.set('webView', webView);
    }
Prepare the panel, show it and save it into the persistent store.