Skip to content

Releases: trendmicro-frontend/react-iframe

v1.0.1

21 Dec 09:51
Compare
Choose a tag to compare

Bump to v1.0.1

v1.0.0

21 Dec 09:27
Compare
Choose a tag to compare

This release contains a breaking change that requires React v16.3 (or above) for using the new static method getDerivedStateFromProps.

To resize Iframe to fit content, you can use native ResizeObserver when available, or a polyfill for the ResizeObserver API:

<Iframe
    src="iframe.html"
    onLoad={({ event, iframe }) => {
        if (!(iframe && iframe.contentDocument)) {
            return;
        }

        const target = iframe.contentDocument.body;
        const nextHeight = target.offsetHeight;
        iframe.style.height = `${nextHeight}px`;

        const observer = new ResizeObserver(entries => {
            const target = iframe.contentDocument.body;
            const nextHeight = target.offsetHeight;
            iframe.style.height = `${nextHeight}px`;
        });
        observer.observe(target);
    }}
/>

v0.3.1

06 Oct 07:46
Compare
Choose a tag to compare

Support React v16.0 (d7b2fb6)

v0.3.0

06 Sep 16:14
Compare
Choose a tag to compare

Removed all getter methods

v0.2.0

06 Sep 03:51
Compare
Choose a tag to compare

Removed the iframe property

v0.1.0

05 Sep 10:37
Compare
Choose a tag to compare

First release