@samitouri / QOS-React-2 / commits / 1664b08f0c

added flow types to setInnerHTML (#13495)

Bryan M committed Aug 28, 2018 at 07:37 UTC 1664b08f0cf6b0e79ee37f6d6a04d4a15d0d13c6
1 file changed +6 -1
packages/react-dom/src/client/setInnerHTML.js
+6 -1
@@ -3,6 +3,8 @@
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 + *
7 + * @flow
8 */
9
10 import {Namespaces} from '../shared/DOMNamespaces';
@@ -18,7 +20,10 @@ let reusableSVGContainer;
20 * @param {string} html
21 * @internal
22 */
21 -const setInnerHTML = createMicrosoftUnsafeLocalFunction(function(node, html) {
23 +const setInnerHTML = createMicrosoftUnsafeLocalFunction(function(
24 + node: Element,
25 + html: string,
26 +): void {
27 // IE does not have innerHTML for SVG nodes, so instead we inject the
28 // new markup in a temp node and then move the child nodes across into
29 // the target node