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! _______________________________________________ Edbrowse-dev mailing list [email protected] http://lists.the-brannons.com/mailman/listinfo/edbrowse-dev
