From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 6549 invoked from network); 20 Oct 2021 07:11:50 -0000 Received: from hurricane.the-brannons.com (216.252.162.32) by inbox.vuxu.org with ESMTPUTF8; 20 Oct 2021 07:11:50 -0000 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by hurricane.the-brannons.com (OpenSMTPD) with ESMTP id 597bc6f6 for ; Wed, 20 Oct 2021 00:11:45 -0700 (PDT) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by hurricane.the-brannons.com (OpenSMTPD) with ESMTPS id 939eab3c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Wed, 20 Oct 2021 00:11:39 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 8F9435C012F for ; Wed, 20 Oct 2021 03:11:37 -0400 (EDT) Received: from imap44 ([10.202.2.94]) by compute4.internal (MEProxy); Wed, 20 Oct 2021 03:11:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= mime-version:message-id:date:from:to:subject:content-type; s= fm1; bh=W+VZAZj8ET895ffZpQtLTXNAQCuGj0KPgacgTfooa3I=; b=VtNgInSh ryA4YkHNA1EuO97tpqndA/8j2wQoru5B7nvmMcb3YSVnyXgAFQGYK4kmbq3n4fCh Ets+1Pm8aVSf8oBwh0NV3X7Oe8I42MSd1QRjkRJQey6UuLwhLz7P9Xj+kUazDBMv KQoXc6CkFKK4lVldkQq4HW/QLtlN7lfvV5WP+LQnHcGFbXV9uRXoWPy7v7p1/BOu dxV7FQEV1rIfUb1BWm7+IA6vn4DoH6jX6yCtJNIvoqZLMkbzM4tu0eMEzBWyrxxN Gkddnh3O40b1FT/t9Ps/2yANnTzkqyDXInq6RUuHZGaowz9dmfcjSvtiD9FkfRbz UrKe9wvbMDaA+A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=W+VZAZj8ET895ffZpQtLTXNAQCuGj 0KPgacgTfooa3I=; b=bsXHXppvlGS3AyF71nLxyYvZaqix1wWYR5+i/5ZlP4wVc e1iuvUP0xQHQzzQCuSe0sZDPaPrWSItFcA0izDajYshNfILIm4YQoNrlxiyjtz91 jFG2Gy9CSVX4a6cyQbmYWCExSGhIjcJBmRQLd1YTNjRK6dy1S4iLb7OubhpwYbJW eo8Z0pOytKnlqtf3jc1kbxR82dVbmx71Wg8FnM4usN+cVDj50kx0aRuDmuqf8txh OHc397SC+m4l11WpEoC0bnhJjHrB+bqxiT2d5GVe+Jv9LxOdgnuPNRPWziGnsSkJ U1PQlwKPnEVi8lA4FRNEsyHSnSrvqBr/rd6PyEyHw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddvfedguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkfffhvffutgesthdtre dtreertdenucfhrhhomhepfdfmvghvihhnucevrghrhhgrrhhtfdcuoehkvghvihhnpggt rghrhhgrrhhtsehfrghsthhmrghilhdrfhhmqeenucggtffrrghtthgvrhhnpeehheeihe ekieeiffehgfelkeehteelheehueeuvdelfffgfeelhfeffeeludfhheenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehkvghvihhnpggtrghrhh grrhhtsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id E9E2AFA0AA8; Wed, 20 Oct 2021 03:11:36 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-1369-gd055fb5e7c-fm-20211018.002-gd055fb5e X-BeenThere: edbrowse-dev@edbrowse.org List-Id: Edbrowse Development List Mime-Version: 1.0 Message-Id: Date: Wed, 20 Oct 2021 00:11:11 -0700 From: "Kevin Carhart" To: edbrowse-dev@edbrowse.org Subject: trustedTypes Content-Type: text/plain This is what I have so far for the trustedTypes API. There may be issues but here's what I came up with. trustedTypes = function(){}; trustedTypes.createPolicy = function(pn,po){ var x = new Object; x.policyName = pn; if (po['createHTML']) x.createHTML = po['createHTML']; if (po['createScript']) x.createScript = po['createScript']; if (po['createScriptURL']) x.createScriptURL = po['createScriptURL']; return x; } This is the code that uses it in the recaptcha library. Later code will expect to be able to get those callback names and run them. if (B = O, (u = G.trustedTypes) && u.createPolicy) { try { B = u.createPolicy('goog#html', { createHTML: a[W].bind(v[0], A), createScript: a[W].bind(v[0], v[2]), createScriptURL: a[W].bind(v[0], v[1]) });