edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] how about wrapping style placement in try-catch?
@ 2017-09-27  4:01 Kevin Carhart
  2017-09-27 10:48 ` Karl Dahlke
  0 siblings, 1 reply; 6+ messages in thread
From: Kevin Carhart @ 2017-09-27  4:01 UTC (permalink / raw)
  To: edbrowse-dev



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.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-09-28  6:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-27  4:01 [Edbrowse-dev] how about wrapping style placement in try-catch? Kevin Carhart
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

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