<commit_before>define([
    'preact',
    'htm',
    'uuid',

    'css!./IFrame.css'
], (
    preact,
    htm,
    {v4: uuidv4}
) => {

    const {h, Component, createRef} = preact;
    const html = htm.bind(h);

    class IFrame extends Component {
        constructor(props) {
            super(props);

            // const {
            //     origin, pathRoot, channelId, hostId,
            //     params, runtime
            // } = props;

            const id = uuidv4();
            this.id = `frame_ ${id}`;

            this.ref = createRef();

            const indexPath = [
                this.props.pathRoot,
                '/iframe_root/index.html',
                '#',
                this.props.original
            ].join('');

            // Make an absolute url to this.
            // TODO: add hash
            this.url = this.props.origin + '/' + indexPath; // + this.cacheBuster();


        }

        cacheBusterKey(buildInfo, developMode) {
            // NB developMode not implemented yet, so always defaults
            // to the gitCommitHash
            if (developMode) {
                return String(new Date().getTime());
            } else {
                return buildInfo.git.commitHash;
            }
        }

        cacheBuster() {
            // TODO: get develop mode from runtime
            return '?cb=' + this.cacheBusterKey(this.props.runtime.config('buildInfo'), false);
        }

        componentDidMount() {
            if (this.ref.current === null) {
                return;
            }
            this.props.whenMounted(this.ref.current.contentWindow);
        }

        render() {
            const params = {
                frameId: this.id,
                parentHost: document.location.origin,<commit_msg>restore cache busting to plugin url.<commit_after>define([
    'preact',
    'htm',
    'uuid',

    'css!./IFrame.css'
], (
    preact,
    htm,
    {v4: uuidv4}
) => {

    const {h, Component, createRef} = preact;
    const html = htm.bind(h);

    class IFrame extends Component {
        constructor(props) {
            super(props);

            // const {
            //     origin, pathRoot, channelId, hostId,
            //     params, runtime
            // } = props;

            const id = uuidv4();
            this.id = `frame_ ${id}`;

            this.ref = createRef();

            const indexPath = [
                this.props.pathRoot,
                '/iframe_root/index.html',
                '#',
                this.props.original
            ].join('');

            // Make an absolute url to this.
            // TODO: add hash
            this.url = this.props.origin + '/' + indexPath + this.cacheBuster();


        }

        cacheBusterKey(buildInfo, developMode) {
            // NB developMode not implemented yet, so always defaults
            // to the gitCommitHash
            if (developMode) {
                return String(new Date().getTime());
            } else {
                return buildInfo.git.commitHash;
            }
        }

        cacheBuster() {
            // TODO: get develop mode from runtime
            return '?__cb__=' + this.cacheBusterKey(this.props.runtime.config('buildInfo'), false);
        }

        componentDidMount() {
            if (this.ref.current === null) {
                return;
            }
            this.props.whenMounted(this.ref.current.contentWindow);
        }

        render() {
            const params = {
                frameId: this.id,
                parentHost: document.location.origin,
{'fraction_non_alphanumeric': 0.12070410729253982, 'fraction_numerical': 0.0016764459346186086, 'mean_word_length': 1.300771208226221, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '516420', 'n_tokens_mistral': 1001, 'n_tokens_neox': 956, 'n_words': 210}