From 604cb2f80473c23f76afd37670a1a7249ae170a3 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sun, 20 Dec 2015 20:34:20 +0100 Subject: Missing files, payment --- extension/lib/polyfill-react.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 extension/lib/polyfill-react.ts (limited to 'extension/lib/polyfill-react.ts') diff --git a/extension/lib/polyfill-react.ts b/extension/lib/polyfill-react.ts new file mode 100644 index 000000000..8238093ab --- /dev/null +++ b/extension/lib/polyfill-react.ts @@ -0,0 +1,19 @@ +"use strict"; + +let React = { + createElement: function(tag, props, ...children) { + let e = document.createElement(tag); + for (let k in props) { + e.setAttribute(k, props[k]); + } + for (let child of children) { + if ("string" === typeof child || "number" == typeof child) { + child = document.createTextNode(child); + } + e.appendChild(child); + } + return e; + } +}; + + -- cgit v1.2.3