From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (mailfrom) identity=mailfrom; client-ip=8.23.224.60; 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.60]) by hurricane.the-brannons.com (Postfix) with ESMTPS id B148277AAF for ; Mon, 19 Feb 2018 15:53:25 -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 505C5369 for ; Mon, 19 Feb 2018 15:54:24 -0800 (PST) Received: from carhart.net (localhost [127.0.0.1]) by carhart.net (8.13.8/8.13.8) with ESMTP id w1JNsNSh015232 for ; Mon, 19 Feb 2018 15:54:23 -0800 Received: from localhost (kevin@localhost) by carhart.net (8.13.8/8.13.8/Submit) with ESMTP id w1JNsM5w015226 for ; Mon, 19 Feb 2018 15:54:23 -0800 Date: Mon, 19 Feb 2018 15:54:22 -0800 (PST) From: Kevin Carhart To: Edbrowse-dev@lists.the-brannons.com In-Reply-To: <20180119010112.eklhad@comcast.net> Message-ID: References: <20180119010112.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] making mixed case out of inline CSS X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.25 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Feb 2018 23:53:25 -0000 Thanks for the new commands! I have not scratched the surface of the new diagnostics yet. Question for Karl about the new CSS code. Can this be called on short inline CSS strings as well as entire files? Sorry if we addressed this in the past. It seems familiar. Oh well, it doesn't matter. This scenario is the cause of one of the frequent runtimes: p = document.createElement("p") literalCSS = "my-attribute:12345" p.style.cssText = literalCSS p.style.myAttribute.indexOf('4') It's pseudocode but the point is that it expects my-attribute to have been converted into a literal myAttribute string which has the string functions. And you do the inline conversion in cssApply, but I can't quite tell if cssApply or dostyle is available a la carte. I'd like to reuse your work that carves up the rules, but I don't need to run either of the gather routines. Just something like.. mw0.CSSStyleDeclaration.prototype.cssText = function(t) { // call cssApply and attach the converted n-v pair to 'this' } thanks Kevin PS, I found out the practical reason for this case conversion! It's to prevent hyphens from being interpreted as subtraction in javascript. So this is a similar issue to hyphens in event names, and the reason why we switched from the dot notation to the bracket notation in the events code. It hadn't clicked for me before that there is actually a point to the conversion into mixedCase.