edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Kevin Carhart <kevin@carhart.net>
To: Edbrowse-dev@lists.the-brannons.com
Subject: [Edbrowse-dev] making mixed case out of inline CSS
Date: Mon, 19 Feb 2018 15:54:22 -0800 (PST)	[thread overview]
Message-ID: <alpine.LRH.2.03.1802191533140.13096@carhart.net> (raw)
In-Reply-To: <20180119010112.eklhad@comcast.net>



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.

      reply	other threads:[~2018-02-19 23:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-19  6:01 [Edbrowse-dev] Seeing caught errors Karl Dahlke
2018-02-19 23:54 ` Kevin Carhart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LRH.2.03.1802191533140.13096@carhart.net \
    --to=kevin@carhart.net \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).