On Tue, Feb 04, 2014 at 05:03:41PM -0500, Karl Dahlke wrote:
> > When I say a page within a window I'm referring
> > to the ability of edbrowse to go back pages.
> 
> cw = cw->prev
> 
> That's a little over simplified, but that's the idea,
> go back to the previous edbrowse window, a completely separate window.
> Really not different from switching buffers.
> The previous window has its own context, its own global object,
> its own html page, etc.

Ok. I'm not arguing this is a nice solution,
but when I tried to work around it, something wasn't working correctly.
I'm not entirely sure why but this was the only way I could get it to behave.

> I'm not going to mess with it now, I'm working on the representation of lines,
> but I may want to remove all those calls and just put one in jSyncup(),
> and see if that works.
> That is the function that is always called when you enter the world of 
> javascript.
> Click a button, submit a form, change a field with onchange code,
> any of those things, calls jSyncup().

Are *all* the js functions called from within jsyncup?
I don't think this is the case with creating a new context etc,
so we still need that one. Also, at the time I did the js changes,
html.c was still there so putting it in there wasn't an option.
I've not touched any of the html code,
so I've got no idea how the ac calls have been done there.
At the end of the day, if *all* the js stuff in html.cpp happens within the
jsyncup call (so the ac object is still in scope)
then the compartment will be correct.
This means we can remove *many* of these calls which I'd say is a *good* thing,
but as I said, I was only working in the js files *not* the html code so I had
to set the compartment at the start of each js function which needed it.

> There might be a simpler function call.
There is, but Mozilla have said it's obsolete and they have a fairly good
record of just removing obsolete functions (and not always updating the docs to 
reflect this).
I can think of a bunch of functions which according to the docs *should* be
there (all be it marked obsolete) but aren't any more.

Now we've got html.cpp I'll have a look at what's been done and what can be 
cleaned up.

Cheers,
Adam.
_______________________________________________
Edbrowse-dev mailing list
[email protected]
http://lists.the-brannons.com/mailman/listinfo/edbrowse-dev

Reply via email to