"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var vdom_1 = require("@dojo/framework/core/vdom");
var global_1 = require("@dojo/framework/shim/global");
var factory = vdom_1.create({ getRegistry: vdom_1.getRegistry });
exports.offscreen = factory(function offscreen(_a) {
    var getRegistry = _a.middleware.getRegistry;
    return function (renderFunction, predicate) {
        var handler = getRegistry();
        var registry = handler ? handler.base : undefined;
        var domNode = global_1.default.document.createElement('div');
        domNode.style.position = 'absolute';
        global_1.default.document.body.appendChild(domNode);
        var r = vdom_1.renderer(renderFunction);
        r.mount({ domNode: domNode, sync: true, registry: registry });
        var result = predicate(domNode);
        global_1.default.document.body.removeChild(domNode);
        return result;
    };
});
exports.default = exports.offscreen;

/*# sourceMappingURL=offscreen.js.map*/