Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

ie 11 not supported method from of Array #236

Closed
dark4eg opened this issue Feb 24, 2016 · 1 comment
Closed

ie 11 not supported method from of Array #236

dark4eg opened this issue Feb 24, 2016 · 1 comment
Labels

Comments

@dark4eg
Copy link

dark4eg commented Feb 24, 2016

import React from 'react';
import { findDOMNode } from 'react-dom';

/* eslint no-eval: 0 */
export default (html) =>
class PageComponent extends React.Component {
componentDidMount() {
window.componentHandler.upgradeElements(findDOMNode(this));

        const demoJs = document.querySelectorAll('.demo-js');
        Array.from(demoJs).forEach(code => eval(code.innerHTML));

        const dialogs = document.querySelectorAll('dialog');
        [].slice.call(dialogs).forEach(dialog => window.dialogPolyfill.registerDialog(dialog));
    }

    componentWillUnmount() {
        window.componentHandler.downgradeElements(findDOMNode(this));
    }

    render() {
        return <section dangerouslySetInnerHTML={{ __html: html }} />;
    }
};

/** WEBPACK FOOTER **
** ./docs/src/PageComponentHelper.js
**/

docs/src/PageComponentHelper.js line 11

@tleunen tleunen added the bug label Feb 24, 2016
@Permagate
Copy link
Contributor

Based on https://babeljs.io/docs/learn-es2015/#math-number-string-object-apis, we might just need to include polyfill to support Array.from syntax. Or we can just avoid it altogether.

@tleunen tleunen closed this as completed in 848c102 Mar 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants