gka / d3-jetpack

🚀 Nifty convenience wrappers that speed up your daily work with d3.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add blacklist of attribute names that need to remain camelCased in sel.at()

gka opened this issue · comments

such as the infamous <feGaussianBlur stdDeviation="4">

https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stdDeviation

also viewBox, markerWidth, and markerHeight

based this SVG attribute reference I came up with this list which would add 856 bytes to our build. I don't think there are any camelCase attributes in HTML.

/(allowReorder|attributeName|attributeType|autoReverse|baseFrequency|baseProfile
|calcMode|clipPathUnits|contentScriptType|contentStyleType|diffuseConstant|edgeMode
|externalResourcesRequired|filterRes|filterUnits|glyphRef|gradientTransform
|gradientUnits|kernelMatrix|kernelUnitLength|keyPoints|keySplines|keyTimes
|lengthAdjust|limitingConeAngle|markerHeight|markerUnits|markerWidth|maskContentUnits
|maskUnits|numOctaves|pathLength|patternContentUnits|patternTransform|patternUnits
|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits
|referrerPolicy|refX|refY|repeatCount|repeatDur|requiredExtensions|requiredFeatures
|specularConstant|specularExponent|spreadMethod|startOffset|stdDeviation|stitchTiles
|surfaceScale|systemLanguage|tableValues|targetX|targetY|textLength|viewBox|viewTarget
|xChannelSelector|yChannelSelector|zoomAndPan)/

yes or no?