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

Improve initialization of preview styling in VS Code 1.63 #317

Merged
merged 3 commits into from
Nov 27, 2021

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Nov 27, 2021

In upcoming VS Code 1.63, every scripts for Markdown preview, including Marp, will execute asynchronously. If our initialization script will run before the scripts provided by other extensions, the style removal for to avoid confliction will fail in styles inserted by the scripts.

This PR changes the preview script to call the initialization callback again when fired window.onload. A delayed initialization callback in onload could wait synchronous execution of every scripts that have loaded asynchrnously.

@yhatt yhatt merged commit 14888c7 into main Nov 27, 2021
@yhatt yhatt deleted the improved-preview-style-toggle branch November 27, 2021 14:24
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