function navigateWebviewAndSetCookie(webview, url, cookie, callback) {
  var messageHandler = Messaging.GetHandler();
  // Handles the response to the request for setting the cookie.
  messageHandler.addHandler(SET_COOKIE_COMPLETE, function(message, portFrom) {
    messageHandler.removeHandler(SET_COOKIE_COMPLETE);
    callback();
  });
  // Navigate and when ready, send the request.
  navigateWebview(webview, url, function() {
    messageHandler.sendMessage(
        new Messaging.Message(SET_COOKIE, {'cookie': cookie}),
        webview.contentWindow);
  });
}
// acknowledgement for setting its cookies.
acknowledgement for setting its cookies.
acknowledgement for setting its cookies .
function navigateWebviewAndSetCookie(webview, url, cookie, callback) {
  var messageHandler = Messaging.GetHandler();
  messageHandler.addHandler(SET_COOKIE_COMPLETE, function(message, portFrom) {
    messageHandler.removeHandler(SET_COOKIE_COMPLETE);
    callback();
  });
  navigateWebview(webview, url, function() {
    messageHandler.sendMessage(
        new Messaging.Message(SET_COOKIE, {'cookie': cookie}),
        webview.contentWindow);
  });
}
function navigateWebviewAndSetCookie ( webview , url , cookie , callback ) { var messageHandler = Messaging . GetHandler ( ) ; messageHandler . addHandler ( SET_COOKIE_COMPLETE , function ( message , portFrom ) { messageHandler . removeHandler ( SET_COOKIE_COMPLETE ) ; callback ( ) ; } ) ; navigateWebview ( webview , url , function ( ) { messageHandler . sendMessage ( new Messaging . Message ( SET_COOKIE , { 'cookie' : cookie } ) , webview . contentWindow ) ; } ) ; }
acknowledgement for setting its cookies.
acknowledgement for setting its cookies .
// Handles the response to the request for setting the cookie. // Navigate and when ready, send the request.