edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [edbrowse-dev] window.location.search and String.search
@ 2019-06-02  0:42 Kevin Carhart
  2019-06-02  6:43 ` Karl Dahlke
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Carhart @ 2019-06-02  0:42 UTC (permalink / raw)
  To: edbrowse-dev


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?



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

end of thread, other threads:[~2019-06-02 12:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-02  0:42 [edbrowse-dev] window.location.search and String.search Kevin Carhart
2019-06-02  6:43 ` Karl Dahlke
2019-06-02  7:10   ` Kevin Carhart
2019-06-02 12:50     ` Karl Dahlke

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