"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DomGetDocument = void 0;
const element_js_1 = require("../element.js");
const index_js_1 = require("../model/index.js");
class DomGetDocument extends index_js_1.Pipe {
    async apply(inputSet, _ctx) {
        const document = await this.$page.document();
        return await this.map(inputSet, async (el) => {
            return new element_js_1.Element(document, el.value);
        });
    }
}
exports.DomGetDocument = DomGetDocument;
DomGetDocument.$type = 'DOM.document';
DomGetDocument.$help = `
Replace the DOM node of each input element with top #document node.

### Use For

- accessing elements outside of current DOM scope (e.g. inside \`each\` loop)
`;
//# sourceMappingURL=DOM.document.js.map