Skip to content

Instantly share code, notes, and snippets.

@mmorton
Forked from akre54/react-svg-patch.coffee
Last active August 29, 2015 14:21
Show Gist options
  • Save mmorton/d399b67d401cf67c94f1 to your computer and use it in GitHub Desktop.
Save mmorton/d399b67d401cf67c94f1 to your computer and use it in GitHub Desktop.
ReactDOM = require 'react/lib/ReactDOM'
ReactElement = require 'react/lib/ReactElement'
ReactElementValidator = require 'react/lib/ReactElementValidator'
SVGDOMPropertyConfig = require 'react/lib/SVGDOMPropertyConfig'
MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE
createFactory = if __DEV__
ReactElementValidator.createFactory
else
ReactElement.createFactory
SVGDOMPropertyConfig.Properties.mask = MUST_USE_ATTRIBUTE
SVGDOMPropertyConfig.Properties.filter = MUST_USE_ATTRIBUTE
SVGDOMPropertyConfig.Properties.stdDeviation = MUST_USE_ATTRIBUTE
ReactDOM.filter = createFactory 'filter'
ReactDOM.feGaussianBlur = createFactory 'feGaussianBlur'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment