From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Achim Gratz Newsgroups: gmane.emacs.devel Subject: Re: Condition to link to javascript code? Date: Sat, 24 Dec 2016 12:41:47 +0100 Message-ID: References: <87eg19uc8y.fsf@gnu.org> <87pokpnn7b.fsf@bzg.fr> <87lgvc8hrp.fsf@bzg.fr> <878trb517w.fsf@bzg.fr> <87oa05h66j.fsf@gmx.us> <87y3z8feig.fsf@gmx.us> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1482580686 31216 195.159.176.226 (24 Dec 2016 11:58:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 24 Dec 2016 11:58:06 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 24 12:58:01 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cKkxV-0006Ex-3i for ged-emacs-devel@m.gmane.org; Sat, 24 Dec 2016 12:57:53 +0100 Original-Received: from localhost ([::1]:43196 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKkxZ-0004TH-ID for ged-emacs-devel@m.gmane.org; Sat, 24 Dec 2016 06:57:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45676) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKkiS-0000WO-BK for emacs-devel@gnu.org; Sat, 24 Dec 2016 06:42:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cKkiP-0008V0-6n for emacs-devel@gnu.org; Sat, 24 Dec 2016 06:42:20 -0500 Original-Received: from [195.159.176.226] (port=33927 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cKkiP-0008Un-0Z for emacs-devel@gnu.org; Sat, 24 Dec 2016 06:42:17 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1cKkiC-0002mD-Qk for emacs-devel@gnu.org; Sat, 24 Dec 2016 12:42:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 26 Original-X-Complaints-To: usenet@blaine.gmane.org In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:210782 Archived-At: 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 :-)