emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Condition to link to javascript code?


From: Achim Gratz
Subject: Re: Condition to link to javascript code?
Date: Sat, 24 Dec 2016 12:41:47 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

Am 23.12.2016 um 17:18 schrieb Richard Stallman:
I don't follow the meaning of that text.  For instance, "rewriting the
page into the form that is then ultimately displayed..."  Could you
explain what sort of rewrite you mean?

The JS code I propose would indeed change the page -- but only in a
single detail, the URL for klipse.js.  That change hardly qualifies
as "rewriting".  So what "rewriting" is it?

You have to rewrite the DOM the browser sees before rendering the page (or at least before it renders the part that loads klipse.js). Whether you replace the complete page or just a single node isn't much of a difference conceptually. The original page would always need to be loaded at least partly, then check for the availability of local script files, decide on where to load them from, then render the modified page. In order to be responsive, those decisions need to be made as early as possible, so it'd be a mistake to render much of the page before getting there. You'd also have to ensure that the browser doesn't prefetch the server versions (i.e. because they are visible in the document before you get to remove them from the final DOM).


--
Achim.

(on the road :-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]