Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
90ab79a
initial commit
dmanek Aug 5, 2021
090c61b
minor refactoring
dmanek Aug 6, 2021
5d83761
minor changes
dmanek Aug 8, 2021
584952c
Merge branch 'main' into amp-iframe-resize
dmanek Aug 9, 2021
aa5227e
Update extensions/amp-iframe/1.0/component.js
dmanek Aug 9, 2021
1d09c46
Merge branch 'amp-iframe-resize' of github.com:ampproject/amphtml int…
dmanek Aug 9, 2021
c0f1235
fix type
dmanek Aug 9, 2021
2d32ab6
update amp-iframe resizing logic
dmanek Aug 9, 2021
7491d4c
call `attemptChangeSize` to perform resizing
dmanek Aug 10, 2021
c6a9c2a
storybook for amp-iframe dynamic resizing
dmanek Aug 10, 2021
d510ccd
fixed iframe width & height
dmanek Aug 10, 2021
d3ccb83
clean up iframe html
dmanek Aug 10, 2021
4fb6ad9
Merge branch 'main' into amp-iframe-resize
dmanek Aug 13, 2021
2715e80
moved inner iframe to /examples/bento folder so it is not validated
dmanek Aug 13, 2021
24611a2
fix type error
dmanek Aug 13, 2021
84d4ffd
Merge branch 'main' into amp-iframe-resize
dmanek Aug 13, 2021
ab8b4db
update tests
dmanek Aug 13, 2021
559b29c
delete unwated tests
dmanek Aug 16, 2021
e704da4
Merge branch 'main' into amp-iframe-resize
dmanek Aug 17, 2021
ae608c9
address code review comments
dmanek Aug 17, 2021
a1d2983
address code review comments + add storybook
dmanek Aug 17, 2021
50806a0
minor updates
dmanek Aug 18, 2021
b588f07
fix lgtm warning
dmanek Aug 18, 2021
abad6d1
add comment about future optimization
dmanek Aug 18, 2021
6ad98fe
minor cleanup
dmanek Aug 18, 2021
b923ee6
update storybook
dmanek Aug 18, 2021
8018407
add knob in storybook
dmanek Aug 18, 2021
e1c818a
fix lint & unit test
dmanek Aug 19, 2021
e466230
Merge branch 'main' into amp-iframe-resize
dmanek Aug 19, 2021
d8dafdb
Merge branch 'main' into amp-iframe-resize
dmanek Aug 19, 2021
3df003c
Merge branch 'main' into amp-iframe-resize
dmanek Aug 20, 2021
f790899
Apply suggestions from code review
dmanek Aug 20, 2021
c5a9730
Merge branch 'amp-iframe-resize' of github.com:ampproject/amphtml int…
dmanek Aug 20, 2021
57d956e
address code review comments
dmanek Aug 20, 2021
c7a94e4
WIP
dmanek Aug 20, 2021
8a45861
remove comment
dmanek Aug 20, 2021
01537e1
Merge branch 'main' into amp-iframe-resize
dmanek Aug 20, 2021
83570bb
remove `attemptChangeSize` in base-element and add overflow check in …
dmanek Aug 20, 2021
1fef77e
Merge branch 'main' into amp-iframe-resize
dmanek Aug 23, 2021
7ec0f67
address code review comments
dmanek Aug 23, 2021
8b57ad7
update amp-iframe to use shadown DOM & contain wrapper
dmanek Aug 23, 2021
3267321
Merge branch 'main' into amp-iframe-contain-wrapper
dmanek Aug 24, 2021
9bc9a73
minor fixes
dmanek Aug 24, 2021
7feb47c
Merge branch 'main' into amp-iframe-contain-wrapper
dmanek Aug 25, 2021
52b3f09
correct use of ContainWrapper
dmanek Aug 25, 2021
87def17
minor refactoring
dmanek Aug 25, 2021
cd81143
add border to storybook test
dmanek Aug 25, 2021
bc10698
Merge branch 'main' into amp-iframe-contain-wrapper
dmanek Aug 26, 2021
0b96561
address code review comment
dmanek Aug 26, 2021
8e86d62
update style and iframeStyle props in storybook
dmanek Aug 26, 2021
1c60270
rename `updateIframeSize` to `updateContainerSize`
dmanek Aug 26, 2021
204fe73
Merge branch 'main' into amp-iframe-contain-wrapper
dmanek Aug 26, 2021
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
Prev Previous commit
Next Next commit
minor changes
  • Loading branch information
dmanek committed Aug 8, 2021
commit 5d83761243fd8100d82b3673abd5c46d9d3bbed9
6 changes: 3 additions & 3 deletions extensions/amp-iframe/1.0/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import * as Preact from '#preact';
import {useEffect} from '#preact';
import {useEffect, useRef} from '#preact';

const NOOP = () => {};

Expand All @@ -34,7 +34,7 @@ export function Iframe({
srcdoc,
...rest
}) {
const ref = Preact.useRef();
const ref = useRef();

useEffect(() => {
const iframe = ref.current;
Expand Down Expand Up @@ -65,7 +65,7 @@ export function Iframe({
io.unobserve(iframe);
window.removeEventListener('message', handleEmbedSizePostMessage);
};
});
}, []);

return (
<iframe
Expand Down
1 change: 1 addition & 0 deletions extensions/amp-iframe/1.0/component.type.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ var IframeDef = {};
* allowFullScreen: (boolean),
* allowPaymentRequest: (boolean),
* allowTransparency: (boolean),
* onLoadCallback: (function),
* referrerPolicy: (string),
* sandbox: (string),
* src: (!string),
Expand Down