jinlin
2024-08-02 826cd5b51d5106cfea07e397eda184fb15ec7a30
1
2
3
4
5
6
7
8
const iframes = document.querySelectorAll('iframe');
[...iframes].forEach((f) => {
  f.addEventListener('load', () => {
    f.contentWindow.QUnit.done(() => {
      f.style.height = (f.contentDocument.body.scrollHeight + 20) + 'px';
    });
  });
});