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 5066 invoked from network); 23 Dec 2021 03:38:52 -0000 Received: from hurricane.the-brannons.com (2602:ff06:725:1:20::25) by inbox.vuxu.org with ESMTPUTF8; 23 Dec 2021 03:38:52 -0000 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by hurricane.the-brannons.com (OpenSMTPD) with ESMTP id c500090a for ; Wed, 22 Dec 2021 19:38:48 -0800 (PST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by hurricane.the-brannons.com (OpenSMTPD) with ESMTPS id 86e20bc0 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Wed, 22 Dec 2021 19:38:43 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 0A3215C019E for ; Wed, 22 Dec 2021 22:38:40 -0500 (EST) Received: from imap49 ([10.202.2.99]) by compute4.internal (MEProxy); Wed, 22 Dec 2021 22:38:40 -0500 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= fm2; bh=l6vwcyEUDRSY4JPksDe5DXozRiTgwJqygsCpDp/eER0=; b=XYAYiK/T i1GlB3doh1OpsrKBdwHEeK1CR8IlWZkGk0WuBgwKfqPp465u/5baTg5mSKdND8He JoiXQ8AFLNQTjpGhH2/uu0+gfQOxnu5VGL1U0Ra2Cd3lCZGBG/ZCxOvxETwUo12E HGLqraQYBh6opwKnkGDs/Qb9rDIl5k07lQxQ+fs1aY15haaSbB4/lFLywsAOkOKX hcm6XC9BfJ9oKdRw3WHqc8cgeC+5OztiW0G0Gk3gsO/nwF0iF1h+azimF2BNUv6Y xfqXxKA58ev5eqD+AS5wDMahd05Iv2ST5BarA3Pinmu8qO4yFl8s7m7bHxJz1QOx TraQO7IQsNgtFA== 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=l6vwcyEUDRSY4JPksDe5DXozRiTgw JqygsCpDp/eER0=; b=TYEIm+w7j0r2/KRMKGeAUnhgcQJXJeNrt52puOFpHQ9Lc pR9G8rVaHWZODIgu2m9iu+eUENptyS21oAEdgjMfLghTU7pcNQjNBE2u8/lLpWdJ ljUF5vZYaRy5kAyZgY8Z2bZcbsOuNyvVioHEfMZlt+v1hvMUPiKVSL+976hJqYQR PQspYXb5LoNrizylkALDdT0l55l3Lo8rQwoT0jXYB7pJtSosYDtrDEvGIwP55jfc agSegq4Mk6FmTdLcicG33y+JSw9FrPletI/uaJdbzUfRigUJMBckiyzGWisD4ynq IzA29doG3wFOCf5yoGf6oyP5o6vpExBx67YlakfDg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddtjedgieduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfffhffvufgtsehttdertd erredtnecuhfhrohhmpedfmfgvvhhinhcuvegrrhhhrghrthdfuceokhgvvhhinhgptggr rhhhrghrthesfhgrshhtmhgrihhlrdhfmheqnecuggftrfgrthhtvghrnhepheehieehke eiieffhefgleekheetleehheeuuedvleffgfeflefhfeefleduhfehnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepkhgvvhhinhgptggrrhhhrg hrthesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 64B8CF60074; Wed, 22 Dec 2021 22:38:39 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-4525-g8883000b21-fm-20211221.001-g8883000b X-BeenThere: edbrowse-dev@edbrowse.org List-Id: Edbrowse Development List Mime-Version: 1.0 Message-Id: Date: Wed, 22 Dec 2021 19:37:53 -0800 From: "Kevin Carhart" To: edbrowse-dev@edbrowse.org Subject: proposed postMessage rev Content-Type: text/plain I think we chewed on a couple of changes to postMessage but they aren't in yet. What do you think of the following? The differences are (1) we are supposed to consider port (as in, networks, 80, 443, not talking about MessageChannel stuff here) when passing or failing the origin test (2) setting me.origin = my$win().location; (3) Adding an else case to the origin test so that if the postMessage can't run, we can be alerted that it didn't ------------- function postMessage(message,target_origin, transfer) { var locstring = this.location.protocol + "//" + this.location.hostname + ":" + this.location.port; if (target_origin == locstring || target_origin == "*") { var me = new Event; me.name = "message"; me.type = "message"; me.origin = my$win().location; me.data = message; me.source = my$win(); if(transfer) { me.ports = transfer; // If these objects had a context, they are now owned by this context. for(var i = 0; i < transfer.length; ++i) if(transfer[i].eb$ctx) transfer[i].eb$ctx = eb$ctx; } this.onmessage$$queue.push(me); alert3("posting message of length " + message.length + " to window context " + this.eb$ctx + " ?" + (message.length >= 200 ? "long" : message) + "?"); } else { // handle a failure here alert3("postMessage failure: the message " + message + " could not be posted to " + this.eb$ctx + " due to the same-origin rule"); } }