From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 9801878697 for ; Thu, 13 Mar 2014 03:46:54 -0700 (PDT) Received: by mail-wi0-f177.google.com with SMTP id cc10so896607wib.10 for ; Thu, 13 Mar 2014 03:45:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=vfhqBkPETqkKy3K7XxOsZNrh59Zv/gfv8TjsYRC08ro=; b=LIOSJMnJVEG7IviQ+LYPRqG20iHM13HECL364eJzQHGKw8Gw1izQif5sz+Sc8SeGMq +bAToF1J1OzBXbVUSf2HpdhDXJFMHShKlmvdTjKWV7CP3tlxGN9FDvLuEyiRUOGttSA4 pPCwc+V1ybve3zXCFSf8kjznoeX3XSJJYHOK88wP20c/13qJWQMm4PLyvSf/K7Gddv1y Yt648cz2RheD2U+bpI34CDgNBNsWwE4hhWWNm0rLzpSI3/DgIhUCZ6h4kWkqaMepj55I XT5hPYQR2NR9sR1fGF8TorJ+2QacTf8oPZWayLyyoBYSwZzhSV1yLDWHsD12PmmW9Xw0 3UUQ== X-Received: by 10.181.13.11 with SMTP id eu11mr1023044wid.30.1394707531123; Thu, 13 Mar 2014 03:45:31 -0700 (PDT) Received: from toaster.adamthompson.me.uk (toaster.adamthompson.me.uk. [2001:8b0:1142:9042::2]) by mx.google.com with ESMTPSA id g5sm4607346wjs.8.2014.03.13.03.45.29 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 13 Mar 2014 03:45:29 -0700 (PDT) Date: Thu, 13 Mar 2014 10:45:26 +0000 From: Adam Thompson To: Chris Brannon Message-ID: <20140313104526.GI13789@toaster.adamthompson.me.uk> References: <20140128183238.eklhad@comcast.net> <20140301133523.GH19851@toaster.adamthompson.me.uk> <87r467we0v.fsf@mushroom.PK5001Z> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6TC23+W66xmFESAX" Content-Disposition: inline In-Reply-To: <87r467we0v.fsf@mushroom.PK5001Z> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: Edbrowse-dev@lists.the-brannons.com Subject: Re: [Edbrowse-dev] Render X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.17 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2014 10:46:55 -0000 --6TC23+W66xmFESAX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 12, 2014 at 09:57:36AM -0700, Chris Brannon wrote: > Adam Thompson writes: >=20 > >> > At the moment if js does stupid things and breaks the js dom that's = not nice > >> > if it completely destroys our method for rendering the buffer that's > >> > not only difficult to debug but also means you end up with an empty = page. >=20 > Can't we make the render function (or edbrowse_render) read-only? I'm > pretty sure we can. But maybe this still wouldn't solve all the > problems. I'm not too sure we can. If so, any chance of linking to the docs as I've y= et to find any which mention read-only functions. > > I'd really like to know how browsers test when scripts have gone into i= nfinite=20 > > loops, or have generally broken >=20 > That's the halting problem, and it isn't computable. There's no way to > truely detect whether an arbitrary script has failed. I suspect they > just use a timeout, but I haven't looked at the source. Yeah, I know about the halting problem, which is why I was unsure how firefox etc kill supposedly broken scripts. I think the time out is probably the approach used since I've seen on a cou= ple of occasions scripts which have triggered this when in reality they've just been taking a *long* time to do anything. > We should be able to call alarm before JS execution and let SIGALRM > interrupt JS when the timeout is reached. But I can't guarantee that > Spidermonkey will not call sleep. Mixing calls to alarm and sleep is a > bad idea. Yeah, but I'm unsure how else we can do this within a single thread. I wonder if smjs has any hooks we can use for this kind of thing. Incidentally, did you know that when one writes an infinite recursive funct= ion, smjs seems to kill it at a certain limit without throwing an error, at least not one which edbrowse displays? The limit seems to be 60000 on my machine. > > No, static html will always exist, and I can point to many sites where = the js > > merely serves to run google analytics etc, > > and which won't be changing any time soon. >=20 > Yes, I'm pretty sure static html will always be with us, because a lot > of written content is basically static. > Also, lots of people are viewing the web with tablets and phones, and > I've read that JavaScript sucks massively on mobile devices. It's getting better with the advent of more powerful devices (my friends now have ones which aren't a million miles away from being more powerful than m= y desktop!). > Unfortunately, blogs created on Google's Blogger platform with the > default template are unreadable without JavaScript. You needed JS > enabled to read content that is static. They weren't readable with > edbrowse, and last time I looked, they weren't even very nice to read in > chrome with chromevox or firefox with a screen reader. Deedra had one > of these, and she couldn't easily read it in firefox.That was early last = year. Maybe Google has fixed their default template > by now. I'm not sure, I hope they fix it if they haven't already. I remember getting emailed a link to one of these and wondering why it was broken in edbrowse. I thought this was a one-off but apparently not. Cheers, Adam. --6TC23+W66xmFESAX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJTIYxGAAoJELZ22lNQBzHOZsYH/0pCVD3619lYe9okCONzEZCa JJ2dn/iy7HU3XUKQ2I0uIjp3j0w/EVQZgiuJ91Qdvox9+x+JcS5NKoO67cuzCXoQ CtmpknCOLxMXn0J1C1yuVVWq1V4RK6SLrLNyDMEaSZNYaPySAa7fCwUrovY0MlfC IAwbDwhmIhruMBHmbmbhcYWV5S0wSXbw8j7KWYRPmhaUNa7HHajRWWvB3+jS8Rza cDE0yYaIhbvb1GMQGPeIzdprsfY3AOfj9yCWRh9Wf9fuu6ZZNTONKrA0vnqoP1EP fgJVP8eQl05yL/+5aqQyftF/GRNqAIwo5YxrvwV3iFjsMIa5OMFuvPRi6LF7ow4= =jajY -----END PGP SIGNATURE----- --6TC23+W66xmFESAX--