edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Kevin Carhart <kevin@carhart.net>
To: Karl Dahlke <eklhad@comcast.net>
Cc: edbrowse-dev@lists.the-brannons.com
Subject: [Edbrowse-dev] javascript() in timer side effects
Date: Sat, 5 Dec 2015 01:12:43 -0800 (PST)	[thread overview]
Message-ID: <alpine.LRH.2.03.1512050028260.581@carhart.net> (raw)
In-Reply-To: <alpine.LRH.2.03.1512041420070.26352@carhart.net>



I pulled up paypal.com to find out if I could
put the new jquery to use.  Among other kinds
of things going on, I found that one of their
timers gives the following:
timer line 1: ReferenceError: javascript is not defined
timer line 1: ReferenceError: javascript is not defined


I think what it traces back to is the SetTimeout code,
where there is a differentiation based on if (fo).

In the true condition, the side effect I think comes
out like:
t{1000|javascript()|0x7f273eb1fd00|1`~@}

In the false condition, this is like Karl's async.html,
and it succeeds:

t{1000|increment()|0x7f368971dd00|1`~@}

So for one thing, I was wondering if I understand
your intention, Karl.  Are you basically saying
"this is an anonymous function anyhow, and we have
to call it something, so let's call it 'javascript'?"
Or alternately, does 'javascript' have meaning as
  a reserved word here?  Is it related to the syntax
of 'javascript:' with the colon, or no relation?

In case you want a recreation of the problem which
doesn't require hacking up paypal code, I made these:

b http://carhart.net/~kevin/async_karls_original.html
b http://carhart.net/~kevin/async_handler_in_variable.html

The former succeeds and the latter fails.  What can be
done?  I was thinking could we send the variable name itself
in the side effect?  That would be, if the phrasing was like

var blah = function() { ... };

The side effect would then contain t{1000|blah()|

thanks
Kevin

  reply	other threads:[~2015-12-05  9:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-02 18:11 [Edbrowse-dev] 3.6.0? Chris Brannon
2015-12-02 20:01 ` Karl Dahlke
2015-12-03  1:59   ` Kevin Carhart
2015-12-03  2:42     ` Chris Brannon
2015-12-03  3:13       ` Kevin Carhart
2015-12-03  4:52         ` Karl Dahlke
2015-12-04  1:05           ` Kevin Carhart
2015-12-04 14:24             ` Karl Dahlke
2015-12-04 21:10               ` [Edbrowse-dev] jquery v2 and an interesting seg fault Kevin Carhart
2015-12-04 22:11                 ` Karl Dahlke
2015-12-04 22:28                   ` Kevin Carhart
2015-12-05  9:12                     ` Kevin Carhart [this message]
2015-12-05 14:39                       ` [Edbrowse-dev] javascript() in timer side effects Karl Dahlke
2015-12-06  0:19                         ` Kevin Carhart
2015-12-06  0:26                           ` Karl Dahlke
2015-12-06  2:48                             ` Kevin Carhart
2015-12-06 11:38                               ` Adam Thompson

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.1512050028260.581@carhart.net \
    --to=kevin@carhart.net \
    --cc=edbrowse-dev@lists.the-brannons.com \
    --cc=eklhad@comcast.net \
    /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).