edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Geoff McLane <ubuntu@geoffair.info>
To: Karl Dahlke <eklhad@comcast.net>
Cc: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] nasa / prepending "on" to events
Date: Fri, 26 Jan 2018 20:13:00 +0100	[thread overview]
Message-ID: <CA+PgotKfzWgTF1eCPwgr8DS6UQTXbUOh9hDQazfmBs6so3M=sw@mail.gmail.com> (raw)
In-Reply-To: <20180026093225.eklhad@comcast.net>

Hi Karl,

Do not know anything about prepending "on", but...

Out of interest I just tried the latest EB
on https://www.nasa.gov and found that this
page is entirely built in javascript!

That is the base html is real simple, skipping the head, and the scripts -

<body class="html front not-logged-in page-indexhtml show-topics-menu"
class="Array">
<div class="l-page ember-init-hide">
 <header class="l-header container-fluid" role="banner"></header>
 <div class="l-main">
 <div class="l-content container-fluid" id="main" role="main">
 <script>
 ...
 </script>
 </div>
 </div>
 <footer class="l-footer container-fluid" role="contentinfo"></footer>
</div>
  <script>
  ...
  </script>
</body>

You can see the 'header', 'main', and 'footer' html is
all generated content...

Now I used a special DEBUG version of libtidy which
show many lines of tidy processing this... part of the
output, again skipping the head ....

  StartTag body   class="Array"
   StartTag div   class="l-page ember-init-hide"
    StartTag header   class="l-header container-fluid" role="banner"
    StartTag div   class="l-main"
     StartTag div   class="l-content container-fluid" id="main" role="main"
      StartTag script
       Text   (6034) '...y","id":"4739"},];
'
    StartTag footer   class="l-footer container-fluid" role="contentinfo"
   StartTag script
    Text   (533) '...a);
     })();

This basically shows the html page as read, with
no real content...

Then javascript is run, and I should see lots
of generated nodes, but I get almost nothing back...
although libtidy is called some 14 times...

That is the next time tidy is run I only get -

  StartTag body
   StartTag a   href="#"

And similarly the 3rd time tidy is run -

  StartTag body
   StartTag form implicit
    StartEnd input

And again the 4th time tidy is run -

  StartTag body
   StartEnd link
   StartTag table
   StartTag a   href="/a"
    Text   (1) 'a'
   StartTag form implicit
    StartEnd input   type="checkbox"

tidy for 5th time

  StartTag body
   StartTag textarea
    Text   (1) 'x'

6th time into libtidy

  StartTag body
   StartTag form implicit
    StartEnd input   type="radio" checked="checked" name="t"

7th time into tidy

  StartTag body
   StartEnd link
   StartTag table
   StartTag a   href="/a"
    Text   (1) 'a'
   StartTag form implicit
    StartEnd input   type="checkbox"

8th time

  StartTag body
   StartEnd link
   StartTag table
   StartTag a   href="/a"
    Text   (1) 'a'
   StartTag form implicit
    StartEnd input   type="checkbox"

9th -

  StartTag body
   StartTag div

And it more or less continues that way
through 10th to 14th time libtidy is called...

That is, there is no substantial html generated,
and as you point out it seems no multiple
hrefs are generated and added to the DOM.

Visually reviewing the page in a browser, I
can see 20 to 50 hrefs. The header is a set of
javascipt driven drop-down links... The body is
some images, each of which is a link... and as
you point out the footer is a set of links, the
last being "Contact NASA" -
link https://www.nasa.gov/about/contact/index.html

So something is either wrong with duktape html
generation, or for some reason it does not get
back to EB, at least not to libtidy...

Now to test a simpler case of javascript html
generation, I constructed a test1.html -
http://geoffair.org/tmp/test1.html - I think
I constructed some of it from your jsrt...

And the first time libtidy is run I see

  StartTag body
   StartTag h1
    Text   (5) 'test1'
   StartTag script
    Text   (661) '
func...fair<\/a><\/p>");

That script contains 2 document.write's...

But then the javascript is run, and the
next libtidy output contains the 2 new html
nodes -

  StartTag body
   StartTag p
    Text   (24) 'date: 2002/11/25 17:55:9'
   StartTag p
    Text   (6) 'link: '
    StartTag a   href="http://geoffair.com"
     Text   (8) 'geoffair'

So everything works well in this `simple` case...

Why does the nasa javascript fail to generate
many, MANY new nodes, with many, many links?

Do not know what else I can try... maybe finding
where duktape passes back html, and add a debug
output, or something... I have tried before debugging
into duktape library, but that is mind boggling...

Will try anything you can suggest...

But hope this helps...

Geoff.

PS: Normally I send this from my Ubuntu
Thunderbird email client but this time
from a Windows machine, so hope it works!

  reply	other threads:[~2018-01-26 19:12 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-19 20:08 [Edbrowse-dev] Error Object Karl Dahlke
2018-01-19 20:51 ` Dominique Martinet
2018-01-25 10:48 ` [Edbrowse-dev] defaultView / cloning onevent$$array Kevin Carhart
2018-01-25 14:07   ` Karl Dahlke
2018-01-25 23:07     ` Kevin Carhart
2018-01-26  2:58       ` Karl Dahlke
2018-01-26  3:50         ` [Edbrowse-dev] nasa / prepending "on" to events Kevin Carhart
2018-01-26  4:59           ` Karl Dahlke
2018-01-26  5:51             ` Kevin Carhart
2018-01-26  6:43               ` Karl Dahlke
2018-01-26  8:10                 ` Kevin Carhart
2018-01-26  8:21                   ` Kevin Carhart
2018-01-26  9:08                     ` Karl Dahlke
2018-01-26 10:38                       ` Kevin Carhart
2018-01-26 14:32                         ` Karl Dahlke
2018-01-26 19:13                           ` Geoff McLane [this message]
2018-01-26 19:28                             ` Karl Dahlke
2018-01-27  3:52                           ` Kevin Carhart
2018-01-27 18:52                             ` Geoff McLane
2018-01-27 21:10                               ` Karl Dahlke
2018-01-28  3:12                               ` Karl Dahlke
2018-01-28 19:19                                 ` Geoff McLane
2018-01-28 21:35                                   ` Karl Dahlke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+PgotKfzWgTF1eCPwgr8DS6UQTXbUOh9hDQazfmBs6so3M=sw@mail.gmail.com' \
    --to=ubuntu@geoffair.info \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    --cc=eklhad@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).