From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (mailfrom) identity=mailfrom; client-ip=8.23.224.62; 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.62]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 1D7D277DE5 for ; Mon, 4 Sep 2017 18:15:47 -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 D0F8B34E for ; Mon, 4 Sep 2017 18:16:37 -0700 (PDT) Received: from carhart.net (localhost [127.0.0.1]) by carhart.net (8.13.8/8.13.8) with ESMTP id v851GZZA023952 for ; Mon, 4 Sep 2017 18:16:36 -0700 Received: from localhost (kevin@localhost) by carhart.net (8.13.8/8.13.8/Submit) with ESMTP id v851GZ5V023946 for ; Mon, 4 Sep 2017 18:16:35 -0700 Date: Mon, 4 Sep 2017 18:16:35 -0700 (PDT) From: Kevin Carhart To: Edbrowse-dev@lists.the-brannons.com In-Reply-To: <20170804101202.eklhad@comcast.net> Message-ID: References: <20170804101202.eklhad@comcast.net> User-Agent: Alpine 2.03 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Re: [Edbrowse-dev] suggested additions 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: Tue, 05 Sep 2017 01:15:48 -0000 Thanks for the feedback. > > Yes but not as simple as it seems. Thank you for implementing (2). Yes, I take your point that it goes deeper than the place I wanted to put my one-liner in decorate.c. > Then, I'm not sure what contentWindo means, but I suppose the window of the frame, rather than the document of the frame, check for specifications. > Even that doesn't work with your example js. > > doc = ( iframe[ 0 ].contentWindow || iframe[ 0 ].contentDocument > ).document > > So we're grabbing window.document or document.document, the latter doesn't make any sense. I know, I don't understand the idiom. I basically said "the latter doesn't make any sense, but if we can supply the former, that appears to be one of the two things it will accept." How does the parsing work if you have a control structure that tests (a || b) and a is true and b is illegal or raises a runtime? I sort of recall that this varies by language, but is it plausble that some languages would test 'a', get a true, and proceed? I have one idea for why this code would be this way. Could it be a superset of two mutually-exclusive browser-DOMs that the jquery author is handling all in one line? For instance, you can't be both a firefox and an IE/Edge at once. Maybe that line is designed as a catch-all that will end up covering multiple client implementations. This still doesn't make document.document make sense. I don't know. > > (7) Following on from Karl's exclusion of @ from the CSS selectors, > > Yeah this is ugly but I started it, so you may as well continue it. > I do think regular expressions are more readable / intuitive, and powerful. I agree, I just don't have all the tokens memorized so it slows me down. I'm not sure I was getting ^ to work right, so I bailed out to a different technique. This is fine. I think I'll submit 1,3,4,5 and 6 as one, and then deal with writing these properly using .match and do 7 as a second patch. I like regex. I'm not averse to it.