This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include("ringo/subprocess"); | |
var log = require("ringo/logging").getLogger(module.id); | |
exports.app = function(req) { | |
log.info("Incoming request."); | |
if (req.method !== "POST") { | |
log.info("Not a valid POST request."); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A version of querySelectorAll() that also recursively looks into all shadow roots. | |
* @param selector Selector | |
* @param root (Optional) Scope of the query (Element or Document). Defaults to the document. | |
* @returns | |
*/ | |
function deepQuerySelectorAll(selector, root) { | |
root = root || document; | |
const results = Array.from(root.querySelectorAll(selector)); | |
const pushNestedResults = function (root) { |