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:42; helo=resqmta-ch2-10v.sys.comcast.net; envelope-from=eklhad@comcast.net; receiver= Received: from resqmta-ch2-10v.sys.comcast.net (resqmta-ch2-10v.sys.comcast.net [IPv6:2001:558:fe21:29:69:252:207:42]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 3D7F177D9F for ; Thu, 25 Jan 2018 06:06:55 -0800 (PST) Received: from resomta-ch2-07v.sys.comcast.net ([69.252.207.103]) by resqmta-ch2-10v.sys.comcast.net with ESMTP id eiApeFeCQC0x5eiBGehDn0; Thu, 25 Jan 2018 14:07:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20161114; t=1516889226; bh=n8SWpIVYBc+7DN2sqXAriRrFOsap1oz1j1v+Jd0n6xQ=; h=Received:Received:To:From:Reply-to:Subject:Date:Message-ID: Mime-Version:Content-Type; b=onrv8gj0Yl+pt0YpM1dplSWp4EyrcIIAr+Fi2WKo3GnDcn/HSDUL9/L1RZK2Rwpsn l6y1k4t7ZNovZBxSDtL3Uo1DMcg16Q04x1UHiHYt+wNvFiuqkRKe+xzfNZ97EE2YBV FpraTNXm6HooBEdfrfBJV1+gJU+zZMkFlCufCWmPVU0BOy2vmh80fkdFpPxGsZo2nq Z7RvKqOQEDyQeZFq0wexppbbkEhecvlzBvRMD5B20KIedaFv95C/KLfmKQ/G3t+jRh yB7HFJwG37/mA+lPRqbGBGYemKSTynaMedIoTIBlQqvQR3j1SZHgwjpZZRwWjP2FI5 zIjhBFbBsU+GQ== Received: from unknown ([IPv6:2601:408:c300:8f09:21e:4fff:fec2:a0f1]) by resomta-ch2-07v.sys.comcast.net with SMTP id eiBFeOQRS9eSseiBGesD1l; Thu, 25 Jan 2018 14:07:06 +0000 To: Edbrowse-dev@lists.the-brannons.com From: Karl Dahlke Reply-to: Karl Dahlke References: <20180019150815.eklhad@comcast.net> User-Agent: edbrowse/3.7.1 Date: Thu, 25 Jan 2018 09:07:05 -0500 Message-ID: <20180025090705.eklhad@comcast.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=nextpart-eb-684924 Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfPAHs/0wLHKiUODpi0zTMROmeFW/9WaSL0cH/fpxD9GNXh2Y8+ts06VqMDeOT72gm1jJZRIBdN7IxiS8WH+ZIkjhE1g3E11QPIsu3kjDFXZiuxibZFPm 7TF+RouqmHW0VzG653X5lR3zkTN5VPdWM0Sk+2Z6uolj1KCcuz8gynDj 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 14:06:56 -0000 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --nextpart-eb-684924 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Wow! The cloneNode function, my version and your version, is really = screwed up! I couldn't see it until I turned the light on. I added a cloneDebug variable, which if true, prints the cloning = process as it happens. Braces are used to indicate the level (depth) of cloning. Set it true and try it on jsrt, which does a few simple clones, and = you'll see what I mean. We were cloning all the propertties in an object, including those = inherited from prototype. So we would copy over getElementsByTagName and other stock functions, and maybe that won't break anything, but it sure is a waste. I added hasOwnProperty to make sure we're cloning true members. When copying arrays, we copied childNodes, and the things under = childNodes, but this was already handled as the children of the node, so we were = copying it twice. Don't know if that was a waste, or if it really broke things. Your fixes brought nasa.gov back from one empty line to 23 lines, = adding in my fixes brings it up to 53 lines. But I'm still not warm and fuzzy. We need to set cloneDebug and step through all the nodes that nasa is = cloning and make sure we're really doing the right thing. Form.elements for instance, that's a specific array with specific DOM = meaning, those children that are input elements, is that being cloned correctly? I think so but not sure. The nasa page has bullet items at the bottom, like Contact NASA, that = are just text but are probably suppose to be links, so not sure what is wrong there. I changed =3D=3D to =3D=3D=3D whenever typeof is involved, but not sure we should do it globally, I'd have to check each one and = see if we do or do not want type conversion. Karl Dahlke --nextpart-eb-684924--