scenario I want:

A user presses a button, this button makes an alert box, user presses cancel button, the action closes the browser tab

HTML

```
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>My page</title>

        <style>
            .bootbox-close-button.close{
                display: none;
            }
            .btn-primary{
            }
        </style>
        <!-- CSS dependencies -->
        <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
    </head>
    <body>

        <p>
            Content here. <a class="alert" href=#>Alert!</a>
        </p>

        <!-- JS dependencies -->
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
        <script src="js/bootstrap.min.js"></script>

        <!-- bootbox code -->
        <script src="js/bootbox.min.js"></script>
        <script>
            $(document).on("click", ".alert", function(e) {
                bootbox.dialog({
                    message : "I am a custom dialog",
                    title : "Custom title",
                    buttons : {
                        ok : {
                            label : "OK",
                            className : "btn-primary"
                        },
                        cancel : {
                            label : "Cancel",
                            className : "btn-default",
                            callback : function() {
                                                /*NEED TO HANDLE CLOSE IN THIS PLACE*/
                                window.parent.close();
                            }
                        }
                    }
                });
            });
        </script>
    </body>
</html>

```

I made like this, and if I press close it says,

> 
> Scripts may close only the windows that were opened by it.
> 
> 
> 

Is it possible to close the parent window?