From 30b577138dda685f65a8529be1866afa6e321845 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 4 Oct 2016 11:50:26 +0200 Subject: Squashed 'thirdparty/preact/' content from commit b2d90cc git-subtree-dir: thirdparty/preact git-subtree-split: b2d90cc116f1d1998f7a7c98dc6986bf4c1841f4 --- src/constants.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/constants.js (limited to 'src/constants.js') diff --git a/src/constants.js b/src/constants.js new file mode 100644 index 000000000..138cd0983 --- /dev/null +++ b/src/constants.js @@ -0,0 +1,20 @@ +// render modes + +export const NO_RENDER = 0; +export const SYNC_RENDER = 1; +export const FORCE_RENDER = 2; +export const ASYNC_RENDER = 3; + +export const EMPTY = {}; + +export const ATTR_KEY = typeof Symbol!=='undefined' ? Symbol.for('preactattr') : '__preactattr_'; + +// DOM properties that should NOT have "px" added when numeric +export const NON_DIMENSION_PROPS = { + boxFlex:1, boxFlexGroup:1, columnCount:1, fillOpacity:1, flex:1, flexGrow:1, + flexPositive:1, flexShrink:1, flexNegative:1, fontWeight:1, lineClamp:1, lineHeight:1, + opacity:1, order:1, orphans:1, strokeOpacity:1, widows:1, zIndex:1, zoom:1 +}; + +// DOM event types that do not bubble and should be attached via useCapture +export const NON_BUBBLING_EVENTS = { blur:1, error:1, focus:1, load:1, resize:1, scroll:1 }; -- cgit v1.2.3