Skip to content

Commit 47c76a5

Browse files
committed
fix(fix iframe size): fix iframe size
1 parent 17f0b98 commit 47c76a5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/utils/common.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@ export const createIframe = async (
194194
iframe.id = 'anyweb-iframe'
195195
mask.id = 'anyweb-iframe-mask'
196196

197+
document.body.appendChild(style)
198+
document.body.insertBefore(mask, document.body.firstElementChild)
199+
200+
iframe.setAttribute('style', 'height: 100%; width: 100%;')
197201
iframe.setAttribute('src', `${appUrl}${url}`)
198202
iframe.setAttribute('frameborder', '0')
199203
iframe.setAttribute('scrolling', 'no')
@@ -213,9 +217,6 @@ export const createIframe = async (
213217
'User canceled the operation'
214218
)
215219
}
216-
document.body.appendChild(style)
217-
218-
document.body.insertBefore(mask, document.body.firstElementChild)
219220
}
220221

221222
export const getIframe = async (

0 commit comments

Comments
 (0)