Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.javascript Subject: Re: Obtaining the DOM tree for a *.htm file on a local disc? Date: Thu, 9 Mar 2023 03:06:19 +0100 Lines: 26 Message-ID: References: <7cb3d7c8-74e8-49d2-ba7d-ab6df813f0c1n@googlegroups.com> <5657000.DvuYhMxLoT@PointedEars.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: individual.net 4L3bpzE5InkaE9e0ZuovwgEG8y4qTnFQlKFM2p8fsMxTPfm2r/ Cancel-Lock: sha1:mBhenJFKZpTOffzc9HlCLaq/npQ= Content-Language: de-DE In-Reply-To: <5657000.DvuYhMxLoT@PointedEars.de> Xref: csiph.com comp.lang.javascript:41235 Thomas 'PointedEars' Lahn, 2023-02-21 22:15: > John Stockton wrote: > >> Is there a readily-available function which can be called from JavaScript >> running in a normal modern browser which, given as an argument the name >> (relative to the current directory, or maybe absolute) of an HTML file, >> will return a reference to the parsed DOM tree of the BODY of the HTML, >> including the Links, Anchors, etc. arrays? > > Apparently they have even killed file:// to file:// HTTP requests in/by > Chromium 108 :-( Which is a good thing. Scripts within a browser which may get loaded from untrusted sources should never be allowed to access the local filesystem. That's why you may end up with Node.js as runtime environment which fits the requirement of using scripts to access local resources much better than running a script in a browser. -- Arno Welzel https://arnowelzel.de