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] how about wrapping style placement in try-catch?
Date: Tue, 26 Sep 2017 21:01:28 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LRH.2.03.1709262050250.6320@carhart.net> (raw)



amazon has a problem with a small handful of style placements, like 5 out 
of hundreds.  When it bails out with a runtime, it neglects to process 
others that might be able to do successfully.  This might be true for 
other sites besides amazon too.

What do you think of the idea of wrapping
if(!t.style[propname])
t.style[propname] = propval;

in a try-catch block?

Note about the root cause:  Diagnosing the root cause would be another 
way to go.  I think the cause has something to do with form 
options.  querySelectorAll("#navbar #nav-search .nav-search-dropdown") 
reports that the length of the resulting set is 1, yet if you echo it from 
jdb, there are about 50 elements in the resulting set.  And it can't get a 
handle on .style for some reason.  It seemed like, given result set rs, 
rs.style did not exist,
and 
rs[0].style did not exist,
but
rs[0][0].style did exist.  After I put some time into diagnosis, I 
thought "this is taking a while for one style... if the issue is obscure, 
we could just skip a few by using try-catch.."  As we do currently
with a few pseudos.



             reply	other threads:[~2017-09-27  3:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-27  4:01 Kevin Carhart [this message]
2017-09-27 10:48 ` Karl Dahlke
2017-09-28  3:45   ` [Edbrowse-dev] amazon Kevin Carhart
2017-09-28  4:58     ` Karl Dahlke
2017-09-28  6:45       ` Kevin Carhart
2017-09-28  3:48   ` [Edbrowse-dev] how about wrapping style placement in try-catch? Kevin Carhart

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.1709262050250.6320@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).