src/PopupTools.js
function openPopupWithPost(url, postData, name, options) {
    var form = document.createElement("form");
    var win;

    form.setAttribute("method", "post");
    form.setAttribute("action", url);
    form.setAttribute("target", name);

    Object.keys(postData).forEach(function addFormItem(key) {
        var input = document.createElement("input");
        input.type = "hidden";
        input.name = key;
        input.value = postData[key];
        form.appendChild(input);
    });

    document.body.appendChild(form);

    win = window.open("/", name, options);
    win.document.write("Loading...");

    form.submit();
    document.body.removeChild(form);

    return win;
}
function openPopupWithPost(url, postData, name, options) {
    var form = document.createElement("form");
    var win;

    form.setAttribute("method", "post");
    form.setAttribute("action", url);
    form.setAttribute("target", name);

    Object.keys(postData).forEach(function addFormItem(key) {
        var input = document.createElement("input");
        input.type = "hidden";
        input.name = key;
        input.value = postData[key];
        form.appendChild(input);
    });

    document.body.appendChild(form);

    win = window.open("/", name, options);
    win.document.write("Loading...");

    form.submit();
    document.body.removeChild(form);

    return win;
}
Create a form element, add hidden inputs for all the post data
and post it into a newly opened popup

@param  {String} url
@param  {Object} postData
@param  {String} name
@param  {Object} options
@return {Object}