From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out.smtp-auth.no-ip.com (smtp-auth.no-ip.com [8.23.224.60]) by hurricane.the-brannons.com (Postfix) with ESMTPS id EA9567ABA9 for ; Sat, 1 Jun 2019 17:42:13 -0700 (PDT) X-No-IP: carhart.net@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from carhart.net (unknown [99.57.137.251]) (Authenticated sender: carhart.net@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id B3A4737FDB0 for ; Sat, 1 Jun 2019 17:42:13 -0700 (PDT) Received: from localhost (kevin@localhost) by carhart.net (8.15.2/8.15.2) with ESMTP id x520gCqw173248 for ; Sat, 1 Jun 2019 17:42:13 -0700 Date: Sat, 1 Jun 2019 17:42:12 -0700 (PDT) From: Kevin Carhart To: edbrowse-dev@lists.the-brannons.com Subject: [edbrowse-dev] window.location.search and String.search Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) X-BeenThere: edbrowse-dev@edbrowse.org List-Id: Edbrowse Development List MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII Thanks for the clarification! This is very fun. I think I already used breakpoint and snapshot to raise something in particular. Since the homepage of baseball is appearing, I tried to load the Players, and I got an error around here: xf = /#|$/; yf = function (a, b) { var c = a.search(xf); Thanks to the breakpoint I was able to echo local 'a' and 'b' ! 'a' is an object and is definitely window.location. You can tell by its member names. b is a string. xf is a regular expression. So look what it does next. It seems like we have a collision between location.search and String.search(//). When it tries to a.search(xf), it crashes: TypeError: '' not callable (property 'search' of [object Object]) Karl, you talk about this at line 701 in startwindow. /* Can't turn URL.search into String.search, because search is already a property of URL, that is, the search portion of the URL. mw0.URL.prototype.search = function(s) { return this.toString().search(s); } */ Can the getter handle both things by differentiating on whether or not anything was sent in?