website icon indicating copy to clipboard operation
website copied to clipboard

WIP: Fix code-block-buttons.js to work in IE11

Open ianchobuilds opened this issue 7 years ago • 3 comments

  • Transpile code-block-buttons.js with babel and include babel-polyfill
  • Minify bundled scripts using babel-minify-webpack-plugin

WIP because not tested in an actual IE11 browser yet(currently don't have one, will test with Netlify link in a few days)

ianchobuilds avatar Aug 10 '18 12:08 ianchobuilds

Deploy preview for babel failed.

Built with commit 224a96f58c5ee49215ff476cb95664909dd05fd1

https://app.netlify.com/sites/babel/deploys/5b72cc02b312747ef9bc50c4

babel-bot avatar Aug 10 '18 12:08 babel-bot

@gyujincho just took at look at this in IE11... I think we can avoid transpiling, as the only thing that seems to be breaking is:

document.querySelectorAll(codeBlockSelector).forEach(...)

We can probably just copy/paste a polyfill (like this one).

(Also looks like we need to fix the css for the copy button for IE11)

existentialism avatar Aug 14 '18 18:08 existentialism

Even if we fix this one file, there are more issues in order to get stuff working in IE11. For example docusaurus ships template strings in some files which get directly sent to browser.

https://github.com/facebook/Docusaurus/blob/master/packages/docusaurus-1.x/lib/static/js/codetabs.js

It is probably not worth fixing imho.

danez avatar May 08 '19 22:05 danez