Skip to content

Fix IE11 in minified version & adopt ES6 in source - #5

Merged
waruqi merged 1 commit into
waruqi:masterfrom
jhildenbiddle:master
Feb 9, 2021
Merged

waruqi merged 1 commit into
waruqi:masterfrom
jhildenbiddle:master

Conversation

@jhildenbiddle

@jhildenbiddle jhildenbiddle commented Feb 9, 2021

Copy link
Copy Markdown
Contributor

Fix #4

  1. Fixed error related to removing the scriptEl on page load. This bug was a result of how the <script> element reference was stored on the DocsifyCarbon object. The fix is to not store an object reference and instead do a querySelector for the script ID each time.
  2. The source file (index.js) has been converted to ES6. Previous, this file was a mash-mash of ES5 and ES6 syntax, so it was already broken in legacy browsers. Adopting ES6 syntax entirely is therefore not a breaking change and provides a better dev experience. The build command listed in the README.md will handle transpiring the ES6 source to ES5 for legacy browsers.
  3. There are a few code simplifications I made as well. There are no behavioral changes.

@jhildenbiddle

Copy link
Copy Markdown
Contributor Author

BTW, apologies for all of the back-and-forth on these IE11-related updates. Testing the first PR was challenging just because of IE11 access and how https://docsify.js.org/ is configured (it only displays ads on the live site, not in previews). These changes I was able to fully test, so this should be the last update. 🤞

Thanks!

@waruqi
waruqi merged commit 1ca5867 into waruqi:master Feb 9, 2021
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.

Cannot read property 'removeChild' of null

2 participants