From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from resqmta-ch2-11v.sys.comcast.net (resqmta-ch2-11v.sys.comcast.net [IPv6:2001:558:fe21:29:69:252:207:43]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 76E2D789FB for ; Mon, 28 Sep 2015 02:44:41 -0700 (PDT) Received: from resomta-ch2-13v.sys.comcast.net ([69.252.207.109]) by resqmta-ch2-11v.sys.comcast.net with comcast id NZns1r0022N9P4d01Znza1; Mon, 28 Sep 2015 09:47:59 +0000 Received: from eklhad ([IPv6:2601:405:4002:b0a:21e:4fff:fec2:a0f1]) by resomta-ch2-13v.sys.comcast.net with comcast id NZny1r0070GArqr01Zny82; Mon, 28 Sep 2015 09:47:58 +0000 To: Edbrowse-dev@lists.the-brannons.com From: Karl Dahlke Reply-to: Karl Dahlke References: <20150827230052.kevin@carhart.net > User-Agent: edbrowse/3.5.4.2+ Date: Mon, 28 Sep 2015 05:47:58 -0400 Message-ID: <20150828054758.eklhad@comcast.net> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1443433679; bh=4Aa13mrQb2Gk/EO1LXdMd0mBC2iaZoBm4aEmgOvqpJc=; h=Received:Received:To:From:Reply-to:Subject:Date:Message-ID: Mime-Version:Content-Type; b=ukGKdq942EzVNTPXcJulmWAdoCf00HslOn0dRfeUaqpiDGhxOTAwWuFrX6IumBz5X Qk6JxkOSvbfuq8c436qutiHwJRRI/2ABCxzilGC56AxYHtet64+W/aBk6nowMWDZ68 cLHtq3yPZDHP87CKa+Co/smrVAU4eyGTn2ooibXmsORHJR8RdGjsVdL5bSDhnJSEVC ZH97yS7yyZD4Ae5hkGEfQxeKTBS3Sfni8uLtsDzEo3TAHeyLktqCdboe0GLs35A1xT f080Gi25UleDzZxvEuLSO2306WdC0fnHjE+QGinkaw2Du6ZFxBKSFHAHtjjdXoXoVF mVgaSCGLytO4Q== Subject: [Edbrowse-dev] [patch] [experimental] JS console patch X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Sep 2015 09:44:41 -0000 > Here is my JS console code. Wow! First of all, I don't undderstand that javascript at all, but I see that it works, so on we go. It is now included in startwindow.js as per the latest push. You don't have to type an extra command; the ok (object keys) function is there. Type jex (javascript executions) from a running web page to enter this mode. I very much didn't want to type jex each and every time, so it's a mode, like a in the editor. Type . by itself to exit this mode. So now you can look at and change variables, and use the ok function for the members of any object. alert(ok(document.body)); But there are two major things to fix. 1. All the gc variables under document are damn annoying. These are artificial placeholders in edbrowse to protect certain things from garbage collection. They could all be members of the object document.gc$, instead of variables under document. That's not hard to do but not trivial, and must be done in both decorate.c and jseng-moz.cpp. 2. The real nuisance is having to type alert all the time. When you run a js shell, from mozilla or v8 or whomever, the result of your entered command is displayed if there is a result. You don't have to type alert all the time. This is obviously what we want. So javaParseExecute should return a string if the executed script has a result, a string we can print if not null, or perhaps a new function javaParseExecuteResult for this purpose. Then this feature won't be quite so painful to use. If you set db3 before you enter then you will see syntax errors etc, instead of just silence, assuming your entered command worked when maybe it didn't. this is not documented yet, because I don't think we have the final interface or all the details worked out. But we all wanted it, and it was so damn easy to do, especially since Kevin handed me the ok() function, so why not move forward on it. If someone wants to address either of the shortcomings above, or suggest improvements, let me know. Karl Dahlke