From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (mailfrom) identity=mailfrom; client-ip=8.23.224.61; helo=out.smtp-auth.no-ip.com; envelope-from=kevin@carhart.net; receiver= Received: from out.smtp-auth.no-ip.com (smtp-auth.no-ip.com [8.23.224.61]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 59E08779A5 for ; Fri, 24 Nov 2017 16:18:32 -0800 (PST) X-No-IP: carhart.net@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from carhart.net (unknown [99.52.200.227]) (Authenticated sender: carhart.net@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id ED8A54A7 for ; Fri, 24 Nov 2017 16:20:03 -0800 (PST) Received: from carhart.net (localhost [127.0.0.1]) by carhart.net (8.13.8/8.13.8) with ESMTP id vAP0K2Tf001560 for ; Fri, 24 Nov 2017 16:20:03 -0800 Received: from localhost (kevin@localhost) by carhart.net (8.13.8/8.13.8/Submit) with ESMTP id vAP0K2jn001484 for ; Fri, 24 Nov 2017 16:20:02 -0800 Date: Fri, 24 Nov 2017 16:20:02 -0800 (PST) From: Kevin Carhart To: Edbrowse-dev@lists.the-brannons.com In-Reply-To: <20171024161945.eklhad@comcast.net> Message-ID: References: <20171016072958.eklhad@comcast.net> <20171024161945.eklhad@comcast.net> User-Agent: Alpine 2.03 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: [Edbrowse-dev] data-* attributes / new work on RC X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.24 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Nov 2017 00:18:32 -0000 Thank you for figuring out the attributes and exceptions! Well I certainly feel efficient, because during this time, I had another look at radiocaroline and I found a couple of good ones. I did about six things entirely in startwindow, and I'm sending you my revised startwindow file. Since attachments are no good, could you retrieve it from... http://carhart.net/~kevin/startwindow_20171124.zip I made sure to grab the latest edbrowse, with the attribute change (63c049f1f6253f952636270be62761dfeeb37281) so hopefully there will not be a collision. Here are the changes: (1) I added an element called Audio in the three places that the litany of element names appears. Some of radiocaroline's javascript files try to instantiate new Audio() (2) I set up localStorage. What does localStorage do for developers that isn't already satisfied by cookies? I don't know, but radiocaroline wants to use it. It expects to call setItem, getItem and removeItem. So I just made a localStorage object and made those three methods into aliases for setAttribute, getAttribute and removeAttribute. (3) Added 'onload' in addition to 'onreadystatechange' in the XMLHttpRequest code. Apparently onreadystatechange is associated with out of date browsers, and newer versions of jquery (>=2) have switched to onload. I hope this change will make ajax on some other sites succeed. (4) Add 'Image' to the short list of element types that gets the addEvent code added to its prototype. Radiocaroline has an onclick on an Image. (5) I added a brick of eb$nullfunction stubs for a lot of Canvas methods, in place of the three or four that we had. Radiocaroline calls a canvas-related library, which wants several of these to be there. I started out by making a stub for one, compile, try again, and it would raise an error on the next one. So that's why I added the whole list. (6) I added encodeURI to the XHR code. There is an ajax request for some JSON in the radiocaroline code, and it appends Date(), I think because this is a trick to avoid cacheing. Usually those types of appends are in timestamp style, but this one comes out like 'Nov 23 2017'. Then the CURL action was failing because the spaces in the request weren't encoded. hope some of these will be good... try out radio caroline after applying - the menus show up via ajax! Unfortunately the links lead you into a black hole which I'd like to discuss separately, but one thing at a time. K On Fri, 24 Nov 2017, Karl Dahlke wrote: > I have addressed the problem uncovered by Kevin, wherein foo=bar in an html tag does not make it over to the js world. > Well it doesn't get there because I didn't implement it. Just didn't do it. > The only tricky part here is identifying all the exceptions. > Example > we have special code to manage this, creating a style object under the a object, then in that style object things like background=red and so on, > and if I then mindlessly set style to its string, as if it was foo=bar, then all that work is thrown away and it doesn't work. > Same comments for onclick = some javascript function, which actually compiles the function and puts that in under onclick, and you wouldn't want that thrown away and replaced with its string. > So there's a list of exception attributes that we manage specialy, and if not in this list, then I go ahead and set object.attribute=value. > The cookie set by oranges.com when you go somewhere else should now be correct, for whatever that's worth. > As always, we hope this makes a few other things work too. > > Karl Dahlke > -------- Kevin Carhart * 415 225 5306 * The Ten Ninety Nihilists