diff options
| author | bptato <nincsnevem662@gmail.com> | 2025-01-13 17:57:03 +0100 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2025-01-13 17:57:03 +0100 |
| commit | f93110919241b3ed9fcf5dcffc5d308e58469360 (patch) | |
| tree | 05b0b5fc9732400872757a840d8437acc306b6c3 /src/html | |
| parent | 37aecf03da331ffb5521e990f928ec14a9055192 (diff) | |
| download | chawan-f93110919241b3ed9fcf5dcffc5d308e58469360.tar.gz | |
config: switch to camel case
We already need a camel -> kebab converter anyway.
Unfortunately this also changes JS binding names, so it's a breaking
change. Oh well.
Diffstat (limited to 'src/html')
| -rw-r--r-- | src/html/dom.nim | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim index b06a1d04..7d41b441 100644 --- a/src/html/dom.nim +++ b/src/html/dom.nim @@ -3770,16 +3770,6 @@ proc getPropertyValue(this: CSSStyleDeclaration; s: string): string {.jsfunc.} = return move(s) return "" -# https://drafts.csswg.org/cssom/#idl-attribute-to-css-property -func IDLAttributeToCSSProperty(s: string; dashPrefix = false): string = - result = if dashPrefix: "-" else: "" - for c in s: - if c in AsciiUpperAlpha: - result &= '-' - result &= c.toLowerAscii() - else: - result &= c - proc getter(ctx: JSContext; this: CSSStyleDeclaration; atom: JSAtom): JSValue {.jsgetownprop.} = var u: uint32 @@ -3792,7 +3782,7 @@ proc getter(ctx: JSContext; this: CSSStyleDeclaration; atom: JSAtom): s = "float" if s.isSupportedProperty(): return ctx.toJS(this.getPropertyValue(s)) - s = IDLAttributeToCSSProperty(s) + s = camelToKebabCase(s) if s.isSupportedProperty(): return ctx.toJS(this.getPropertyValue(s)) return JS_UNINITIALIZED |