[Dillo-dev] javascript

3 views
Skip to first unread message

bruce m beach

unread,
Aug 24, 2015, 11:16:12 PM8/24/15
to dill...@dillo.org
Hello everybody

I completely happy with dillo just the way it is. I consider it
insane to go on the web with javascript enabled and apart from
gmail I don't normally have cookies enabled. (how can I
differentiate the two users? i.e I have dillo of user 1 on the
the screen and a dillo of user 2 also on the screen but the 2
dillo's are identical in appearance). Anyway all of a sudden
after using dillo for a year or so I find there is a website that
I absolutely must get on but it requires javascript. Well okay I
search the web to try to find something, anything that has
javascript (I've been searching for day and night for about a
week now) and find that there are two things

1) Massive huge bloatware
2) dillo

Most things don't build, or don't have any kind of a build system
or are for x86 (I'm on arm) so I figure I have to bite the bullet
and build firefox. I've been rolling my own system for about 20
years so so I know whats involved but after two config failures
and it failing on the gigantic final link after an 8 hour build,
I come to the conclusion that lifes not worth it. I don't want
that piece of junk on my computer anyway. Links2 at one time had
javascript but they abandoned it and elinks has javascript as
long as you have seamonkey installed (tarball>190Mbytes)

Anybody got any ideas?

I did find one thing. "duktape" (http://duktape.org/)which seems
to be an exceptionlly fine piece of code which is an embeddable
Ecmascript E5/E5.1 engine with a focus on portability and compact
footprint. All the examples compiled out of the box and linking
it to dillo (duktape.c duktape.h) took a few minutes to change
the makefile. The size's of the files are

dillo 558,480
dillo 767,456 with ducttape

I don't know enough to be able to do anything with it (I work
with hardware) but thought someone might be interested as a route
to get javascript on dillo.

Bruce

_______________________________________________
Dillo-dev mailing list
Dill...@dillo.org
http://lists.dillo.org/cgi-bin/mailman/listinfo/dillo-dev

Teodoro Santoni

unread,
Aug 25, 2015, 12:49:02 PM8/25/15
to bruce m beach, dill...@dillo.org
Astounding.
But you haven't added the most important thing: does your site works under dillo w/duktape?
Because, y'know, that's more than astounding to me!

--
Teodoro Santoni

Something is wrong. I don't wanna compile 20 KB of Go code to list files.

bruce m beach

unread,
Aug 25, 2015, 10:59:51 PM8/25/15
to Teodoro Santoni, dill...@dillo.org
>> But you haven't added the most important thing: does your site
>> works under dillo w/duktape? Because, y'know, that's more than
>> astounding to me!

Well yes that would be pretty astounding since duk-tape most certainly
wouldn't do anything since it was just linked in to the dillo
executable. Dillo has to be modified to use it, maybe a lot of
work. My guess is that somewhere in Dillo is a state machine that
parses out keywords or tokens from the incoming stream and when
it has a complete token it branches to handle the token. When the
token 'script' is found then the following text is passed to the
parser in duktape.

Bruce

James C

unread,
Aug 26, 2015, 1:29:51 AM8/26/15
to bruce m beach, dill...@dillo.org
src/table.hh might be a reasonable place to start thinking about the
requirements for integrating a new set of tags.

bruce m beach

unread,
Aug 30, 2015, 9:46:03 PM8/30/15
to dill...@dillo.org
Hello everybody

The following emails for some reaseon never made to the list
so I am resending them.

---------------- Email 1 ----------------------------------------
James C wrote:
>> src/table.hh might be a reasonable place to start thinking
>> about the requirements for integrating a new set of tags.

Don't know. I looked at it. Are you sure you meant table.hh?
I'm not sure that any new tags would actually be added anyway.

If anything I would look at

Html_tag_open_script(...) {
Html_tag_close_script(...) {

as likely candidates for a starting point.

I did get binaries for iceweasel that worked. 285 files @ 21M and
all I do is click:

"accept"

Thats it. Close the browser(and the chroot, since i can't get it
working otherwise) and start dillo. I don't need javascript again
until the lease expires about 20hrs later.

Bruce

--------------- Email 2 ----------------------------------------

James C wrote
> Do you have dtrace, dtruss or strace, to look for open() to see
> where JavaScript is writing its state? That's my guess about
> why you'd need a chroot or similar.

I have strace, but the reason I need the chroot is that the
library versions for iceweasel don't match the versions on my
system and the files are all over the place. Iceweasel will
eventually go away. Right now getting the glue between dillo and
duktake is beginning to look pretty good but I have run into a
puzzle of a different kind.

I put a print statement in Html_tag_open_script and
Html_tag_close_script and indeed you see "in Html_tag_open_script"
and "Html_tag_close_script" every time the script tag is
encountered. Now if I load that signon page I get a blank screen
and the messages are -> not <- displayed, and the stop Icon stays
permanently on. Looking at the code I find the tag

<noscript>
<meta HTTP-EQUIV="REFRESH" content="0;
url=https://guestportal.burnaby.ca/login_noscript.html">
</noscript>

If I delete these lines dillo loads the page normally and every
thing is fine. Looking in the table in html.cc I find:

const TagInfo Tags[] =
... ...
/* noscript 1011 */
... ...

blindly replaceing this line with:

{"script", B8(111001),'R',2, Html_tag_open_script,NULL,Html_tag_close_script},

and changing "script" to "noscript" on the assumtion that when
dillo hits the tag </noscript> it will then just continue until it
hits </noscript>, throw away the data and then continue on,
which it apparently does. The question is what to do about it. If
it is something that is going to be implemented but nobody has
got around to it then I would at least put in a:

Html_tag_open_noscript() and a
Html_tag_close_noscript()

so that web pages don't stall when dillo hits that tag.


Bruce
Reply all
Reply to author
Forward
0 new messages