Skip to content

Conversation

NoraH1to
Copy link

before fix:

before

after fix:

after

@NoraH1to
Copy link
Author

Because frequent resizing causes iframes to be destroyed before they are loaded, the onload of the iframe is not executed, which causes a promise to remain in a pending state and block the queue.

See the section I modified for details.

this._height = null;
}

this.loading && this.loading.reject('cancel');
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure the promise doesn't get stuck in pending, this avoids queue blocking.


load(contents) {
var loading = new defer();
this.loading && this.loading.reject('cancel');
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure the last promise is released.

Comment on lines +13 to +17
static ViewMap = new Map();
constructor(section, options) {
const oldView = IframeView.ViewMap.get(section.href);
if (oldView) oldView.destroy();
IframeView.ViewMap.set(section.href, this);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that the previous instance of the current page is destroyed to prevent promise blocking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant