edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] js engine strings
@ 2015-06-11  5:22 Karl Dahlke
  2015-06-12 20:22 ` Adam Thompson
  0 siblings, 1 reply; 4+ messages in thread
From: Karl Dahlke @ 2015-06-11  5:22 UTC (permalink / raw)
  To: Edbrowse-dev

I converted all the jseng-moz.cpp strings from c++ to c,
using the usual string management routines.
The only c++ constructs are those required by the mozilla api.
It should be easy now to convert this to a c process, as in duktape.

Along the way I found and fixed a bug related to document.cookie.
This is a doorway to set and read cookies.

document.cookie = "foo=1";
document.cookie = "bar=2";
alert(document.cookie);

This should print
foo=1; bar=2
but it only retained the last cookie, and would show
bar=2
A lot of websites rely on cookies, and don't work right without them,
and some of these sites use javascript to manage cookies,
so it's important that we get this one right.

As usual, the bug went unnoticed because it was not tested in jsrt.
I added a test for this now.

Karl Dahlke

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

* Re: [Edbrowse-dev] js engine strings
  2015-06-11  5:22 [Edbrowse-dev] js engine strings Karl Dahlke
@ 2015-06-12 20:22 ` Adam Thompson
  2015-06-12 20:44   ` Karl Dahlke
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Thompson @ 2015-06-12 20:22 UTC (permalink / raw)
  To: Karl Dahlke; +Cc: Edbrowse-dev

[-- Attachment #1: Type: text/plain, Size: 1253 bytes --]

On Thu, Jun 11, 2015 at 01:22:09AM -0400, Karl Dahlke wrote:
> I converted all the jseng-moz.cpp strings from c++ to c,
> using the usual string management routines.
> The only c++ constructs are those required by the mozilla api.
> It should be easy now to convert this to a c process, as in duktape.

Thanks. Sorry I've not been as active with development recently, hopefully I'll have the time to get this done soon.

> Along the way I found and fixed a bug related to document.cookie.
> This is a doorway to set and read cookies.
> 
> document.cookie = "foo=1";
> document.cookie = "bar=2";
> alert(document.cookie);
> 
> This should print
> foo=1; bar=2
> but it only retained the last cookie, and would show
> bar=2
> A lot of websites rely on cookies, and don't work right without them,
> and some of these sites use javascript to manage cookies,
> so it's important that we get this one right.
> 
> As usual, the bug went unnoticed because it was not tested in jsrt.
> I added a test for this now.

Do such cookies also get stored as normal in Edbrowse?
I only ask since I'm wondering if this explains why the "remember me"
box on a couple of web apps I use fails to work once I close the browser.

Cheers,
Adam.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* [Edbrowse-dev]  js engine strings
  2015-06-12 20:22 ` Adam Thompson
@ 2015-06-12 20:44   ` Karl Dahlke
  2015-06-12 20:48     ` Karl Dahlke
  0 siblings, 1 reply; 4+ messages in thread
From: Karl Dahlke @ 2015-06-12 20:44 UTC (permalink / raw)
  To: Edbrowse-dev

>Do such cookies also get stored as normal in Edbrowse?

They do, if they are persistent cookies.
The new cookie is passed back as a side effect,
in the effects string, from the js engine to edbrowse,
which then passes it to curl, which puts it in the jar.

Karl Dahlke

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

* [Edbrowse-dev]   js engine strings
  2015-06-12 20:44   ` Karl Dahlke
@ 2015-06-12 20:48     ` Karl Dahlke
  0 siblings, 0 replies; 4+ messages in thread
From: Karl Dahlke @ 2015-06-12 20:48 UTC (permalink / raw)
  To: Edbrowse-dev

> Sorry I've not been as active with development recently,

That's just as well.
I really needed to make these "moving to C" changes,
and fix the aforementioned bug, before you make use of the code.
Otherwise you would have had to do the same work.
Sometimes it pays to procrastinate (a little).

Karl Dahlke

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

end of thread, other threads:[~2015-06-12 20:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-11  5:22 [Edbrowse-dev] js engine strings Karl Dahlke
2015-06-12 20:22 ` Adam Thompson
2015-06-12 20:44   ` Karl Dahlke
2015-06-12 20:48     ` 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).