From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2001:558:fe21:29:69:252:207:35; helo=resqmta-ch2-03v.sys.comcast.net; envelope-from=eklhad@comcast.net; receiver= Received: from resqmta-ch2-03v.sys.comcast.net (resqmta-ch2-03v.sys.comcast.net [IPv6:2001:558:fe21:29:69:252:207:35]) by hurricane.the-brannons.com (Postfix) with ESMTPS id BFD6B779A5 for ; Thu, 21 Dec 2017 18:55:47 -0800 (PST) Received: from resomta-ch2-19v.sys.comcast.net ([69.252.207.115]) by resqmta-ch2-03v.sys.comcast.net with ESMTP id SDWseN7A2PAObSDXOeSeHT; Fri, 22 Dec 2017 02:58:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20161114; t=1513911498; bh=7IiHh5SeNxB2c38KMamnefnqi3nVboN+Bpdzq5z2Ljk=; h=Received:Received:To:From:Reply-to:Subject:Date:Message-ID: Mime-Version:Content-Type; b=FCA5ls180XnSankuVEUrLS+DDb2CDYlLvkP1x0fC0/KIuzZ0xX1fg10Vu2TcY+3ek Sdp0D+Cl6fivJYQLNZF9DyC3qm3CGefkFwM3TY70zLL/t94bKabDPqmyHoKxeLIJ9s 4EHksts2zWq1S1wn9/pIZXjUOsiIlnvsBE4q1CjWTkAePXN439LuQ+oYi8vokFRNdr 0o+nnfuqPZ6o1kvXwjgfeY43oOzFOQB1OcnLuh8qTIfwt43XtvUFqXcznLqlysEJQI cVejgXYMIJ5lAI6MD2HjBLlLugJWUQoFodFTDXGBIvpH0MAEWRS631enX4CNOBeRIt R+OwTdF26TGLw== Received: from unknown ([IPv6:2601:408:c300:8f09::a43a]) by resomta-ch2-19v.sys.comcast.net with SMTP id SDXNe9Ood5Ls1SDXOeleIS; Fri, 22 Dec 2017 02:58:18 +0000 To: edbrowse-dev@lists.the-brannons.com From: Karl Dahlke Reply-to: Karl Dahlke References: User-Agent: edbrowse/3.7.1 Date: Thu, 21 Dec 2017 21:58:17 -0500 Message-ID: <20171121215817.eklhad@comcast.net> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfKK364a8GT4BzfHfpYf4Rm8yzyQVfj6akSW4Bm2XyP5vxmNIeA1RVImcT1P5DWPxVVO8TdUlbLcEA4pfdmyoJyzEBTQoous/RFtQXbILoRwN1LFXWPFm ILSR0spXtcAyjKOh0F2W2njADHN5EnT88n66icouoLhyOEahY5YNOaKg Subject: [Edbrowse-dev] document.head.querySelector X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.24 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Dec 2017 02:55:48 -0000 Well for starters, a.href = a.href; makes no sense to me. What's the point of that? Then my real question is, is a.protocol suppose to have side effects, not just a string. Is it suppose to dip into a.href? Object.defineProperty(A.prototype, "protocol", { get: function() {return this.href.protocol; }, set: function(v) { this.href.protocol = v; } }); If there are no such side effects then the code really doesn't make any sense. You might have to dig into the behavior of the A tag to know for sure. createWebSocketURL: function(url) { var a; if (url && !/^wss?:/i.test(url)) { a = document.createElement("a"); a.href = url; a.href = a.href; a.protocol = a.protocol.replace("http", "ws"); return a.href; } else { return url; } }, Similar questions apply for img.src and iframe.src and form.action and other tags that have implicit urls. Karl Dahlke