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

fix: added support legacy browsers in preload code #9001

Closed

Conversation

NikolayMakhonin
Copy link

Description

Replaced modern js features in preload code with their legacy equivalents for support legacy browsers.

Additional context

The initial purpose is to add support legacy browsers to the @svelte/kit. You can see my template project for this:
https://github.com/NikolayMakhonin/svelte-kit-template

I have tested these changes for svelte/kit in Chromium 39 and 44. It worked. But I'm not sure if the same problem won't happen again in the future for other frameworks.

The most frequent modern js features, that I had replace in defferent projects for support legcy browsers:

  1. use anonymous functions instead arrow functions
  2. use var instead let / const
  3. use regexp instead startsWith / endsWith
  4. don't use Array.from
  5. don't use string templates
  6. don't use spread operators or shorthand properties

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@netlify
Copy link

netlify bot commented Jul 8, 2022

Deploy Preview for vite-docs-main canceled.

Name Link
🔨 Latest commit a54e9b4
🔍 Latest deploy log https://app.netlify.com/sites/vite-docs-main/deploys/62c869f57de5fb0008edd036

NikolayMakhonin added a commit to NikolayMakhonin/svelte-kit-template-old that referenced this pull request Jul 9, 2022
@NikolayMakhonin
Copy link
Author

Solved in this issue. This pull request will be worse than the solution described there.

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