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] nasa / prepending "on" to events
Date: Thu, 25 Jan 2018 19:50:28 -0800 (PST)	[thread overview]
Message-ID: <alpine.LRH.2.03.1801251922220.27769@carhart.net> (raw)
In-Reply-To: <20180025215803.eklhad@comcast.net>



Semi related -- I don't know that this harms nasa rendering, but I suspect 
it is widespread enough that it would:

I think there is something wrong with the event listener with prepending 
"on" or not prepending "on".

Here is what I am observing.  With the current startwindow, if you call 
addEventListener("click"...), you cannot then trigger the code 
with .click().  Note that a1.click() below does nothing.  Both cases for 
attachEvent work.

a1 = document.createElement("div")
[object Object]
a2 = document.createElement("div")
[object Object]
a3 = document.createElement("div")
[object Object]
a1.addEventListener("click",function(){ alert('ael - pass in click - 
listen for click') },false)
undefined
a2.attachEvent("click",function(){ alert('ae - pass in click - listen for 
click') },false)
undefined
a3.attachEvent("onclick",function(){ alert('ae - pass in onclick - listen 
for click') },false)
undefined
a1.click()
a2.click()
ae - pass in click - listen for click
undefined
a3.click()
ae - pass in onclick - listen for click
undefined

-----------------------------------

If I comment out the line that prepends "on" , line 1386, now all three 
phrasings run their handler.


a1 = document.createElement("div")
[object Object]
a2 = document.createElement("div")
[object Object]
a3 = document.createElement("div")
[object Object]
a1.addEventListener("click",function(){ alert('ael - pass in click - 
listen for click') },false)
undefined
a2.attachEvent("click",function(){ alert('ae - pass in click - listen for 
click') },false)
undefined
a3.attachEvent("onclick",function(){ alert('ae - pass in onclick - listen 
for click') },false)
undefined

a1.click()
ael - pass in click - listen for click
undefined
a2.click()
ae - pass in click - listen for click
undefined
a3.click()
ae - pass in onclick - listen for click
undefined


  reply	other threads:[~2018-01-26  3:50 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 ` [Edbrowse-dev] defaultView / cloning onevent$$array Kevin Carhart
2018-01-25 14:07   ` Karl Dahlke
2018-01-25 23:07     ` Kevin Carhart
2018-01-26  2:58       ` Karl Dahlke
2018-01-26  3:50         ` Kevin Carhart [this message]
2018-01-26  4:59           ` [Edbrowse-dev] nasa / prepending "on" to events 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.1801251922220.27769@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).