edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Kevin Carhart <kevin@carhart.net>
To: Edbrowse-dev@lists.the-brannons.com
Subject: [Edbrowse-dev] defaultView / cloning onevent$$array
Date: Thu, 25 Jan 2018 02:48:37 -0800 (PST)	[thread overview]
Message-ID: <alpine.LRH.2.03.1801250222330.9464@carhart.net> (raw)
In-Reply-To: <20180019150815.eklhad@comcast.net>



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


  parent reply	other threads:[~2018-01-25 10:48 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-19 20:08 [Edbrowse-dev] Error Object Karl Dahlke
2018-01-19 20:51 ` Dominique Martinet
2018-01-25 10:48 ` Kevin Carhart [this message]
2018-01-25 14:07   ` [Edbrowse-dev] defaultView / cloning onevent$$array Karl Dahlke
2018-01-25 23:07     ` Kevin Carhart
2018-01-26  2:58       ` Karl Dahlke
2018-01-26  3:50         ` [Edbrowse-dev] nasa / prepending "on" to events Kevin Carhart
2018-01-26  4:59           ` Karl Dahlke
2018-01-26  5:51             ` Kevin Carhart
2018-01-26  6:43               ` Karl Dahlke
2018-01-26  8:10                 ` Kevin Carhart
2018-01-26  8:21                   ` Kevin Carhart
2018-01-26  9:08                     ` Karl Dahlke
2018-01-26 10:38                       ` Kevin Carhart
2018-01-26 14:32                         ` Karl Dahlke
2018-01-26 19:13                           ` Geoff McLane
2018-01-26 19:28                             ` Karl Dahlke
2018-01-27  3:52                           ` Kevin Carhart
2018-01-27 18:52                             ` Geoff McLane
2018-01-27 21:10                               ` Karl Dahlke
2018-01-28  3:12                               ` Karl Dahlke
2018-01-28 19:19                                 ` Geoff McLane
2018-01-28 21:35                                   ` Karl Dahlke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LRH.2.03.1801250222330.9464@carhart.net \
    --to=kevin@carhart.net \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).