Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added: Only check overflowed elements #1278

Merged
merged 21 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"delog",
"filesize",
"iife",
"Initialising",
"logcapture",
"Loggable",
"sarif",
Expand Down
11 changes: 7 additions & 4 deletions example/child/frame.animate.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@
<h4>Data returned by parentIFrame.getParentProps()</h4>
<table id="data"></table>

<span id="insert"></span>

<!--
The data-iframe-size attribute tells iframe-resizer to use this element
to calculate the height of the iframe, when the content overflows the
Expand All @@ -99,10 +101,11 @@ <h4>Data returned by parentIFrame.getParentProps()</h4>

<script>
// Add some content to to show the effect of using data-iframe-size above
for (let i = 0; i < 10_000; i++) {
document.write(
'<div style="position: absolute">This is a test to see if the page will grow to accommodate the content.</div>',
);
for (let i = 0; i < 500; i++) {
const span = document.createElement('span')
span.style.setProperty('position', 'relative')
span.textContent = `. `
document.getElementById('insert').append(span);
}

</script>
Expand Down
1 change: 0 additions & 1 deletion example/child/frame.content.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<script
type="text/javascript"
src="../../js/iframe-resizer.child.js"
defer
></script>
<script>
function toggle() {
Expand Down
2 changes: 1 addition & 1 deletion example/html/width.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<h2>Automagically resizing iFrame</h2>
<p>
Back to
<a name="anchorParentTest" href="index.html">horizontal iFrames</a>.
<a name="anchorParentTest" href="index.html">vertical iframes</a>.
</p>
<div id="iframeContainer" style="margin: 20px">
<iframe
Expand Down
Loading
Loading