From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (mailfrom) identity=mailfrom; client-ip=8.23.224.61; helo=out.smtp-auth.no-ip.com; envelope-from=kevin@carhart.net; receiver= Received: from out.smtp-auth.no-ip.com (smtp-auth.no-ip.com [8.23.224.61]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 1BE3F77DE5 for ; Tue, 26 Sep 2017 20:59:50 -0700 (PDT) X-No-IP: carhart.net@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from carhart.net (unknown [99.52.200.227]) (Authenticated sender: carhart.net@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 2A44035B for ; Tue, 26 Sep 2017 21:01:30 -0700 (PDT) Received: from carhart.net (localhost [127.0.0.1]) by carhart.net (8.13.8/8.13.8) with ESMTP id v8R41SkY013241 for ; Tue, 26 Sep 2017 21:01:29 -0700 Received: from localhost (kevin@localhost) by carhart.net (8.13.8/8.13.8/Submit) with ESMTP id v8R41S7Y013238 for ; Tue, 26 Sep 2017 21:01:28 -0700 Date: Tue, 26 Sep 2017 21:01:28 -0700 (PDT) From: Kevin Carhart To: edbrowse-dev@lists.the-brannons.com Message-ID: User-Agent: Alpine 2.03 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Subject: [Edbrowse-dev] how about wrapping style placement in try-catch? X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.24 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Sep 2017 03:59:50 -0000 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.