From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (mailfrom) identity=mailfrom; client-ip=8.23.224.60; helo=out.smtp-auth.no-ip.com; envelope-from=kevin@carhart.net; receiver= Received: from out.smtp-auth.no-ip.com (smtp-auth.no-ip.com [8.23.224.60]) by hurricane.the-brannons.com (Postfix) with ESMTPS id CCDB177AAF for ; Thu, 25 Jan 2018 02:48:27 -0800 (PST) X-No-IP: carhart.net@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from carhart.net (unknown [99.52.200.227]) (Authenticated sender: carhart.net@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id ECB7F501 for ; Thu, 25 Jan 2018 02:48:38 -0800 (PST) Received: from carhart.net (localhost [127.0.0.1]) by carhart.net (8.13.8/8.13.8) with ESMTP id w0PAmb6b020323 for ; Thu, 25 Jan 2018 02:48:37 -0800 Received: from localhost (kevin@localhost) by carhart.net (8.13.8/8.13.8/Submit) with ESMTP id w0PAmbxB020320 for ; Thu, 25 Jan 2018 02:48:37 -0800 Date: Thu, 25 Jan 2018 02:48:37 -0800 (PST) From: Kevin Carhart To: Edbrowse-dev@lists.the-brannons.com In-Reply-To: <20180019150815.eklhad@comcast.net> Message-ID: References: <20180019150815.eklhad@comcast.net> User-Agent: Alpine 2.03 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: [Edbrowse-dev] defaultView / cloning onevent$$array X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.25 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jan 2018 10:48:27 -0000 The recent work on debugging and better diagnostics is great - very exciting. I have a startwindow with two suggested changes. Please download it from http://carhart.net/~kevin/startwindow_20170124.zip (1) defaultView gets referenced as a property, rather than being called. I goofed in making it a function. So I converted it into a property with its code as a getter. (2) While we modified cloneNode to bring over functions, it wasn't bringing over the onevent$$array arrays, if these are among the child items of the node being cloned deeply. I took KD's code for instanceof Array, used when the node to copy, itself, is instanceof Array, and used this as a model to do the same thing so that an instanceof Array among the child items will be handled also. This change to cloneNode brings nasa.gov back from returning 1 character to returning some content. A series of impressive console errors ensues. I also have a suggestion (3) which I didn't do yet. I was reading that the == equality test operator does "some funky conversions" , typecasting before comparison, and the triple === is the "strict equality" operator, with no drawbacks in the materials I found. I was looking up the proper way to do a typeof test and found a reference that said you should say (typeof blah==='object'). So for consistency, any objections to converting all the == in startwindow.js into ===? thanks Kevin