jperasmus / docsify-copy-code

A docsify plugin that copies Markdown code block to your clipboard
MIT License
99 stars 72 forks source link

Broken in IE10/11 #1

Closed jhildenbiddle closed 6 years ago

jhildenbiddle commented 6 years ago

Two issues:

https://github.com/jperasmus/docsify-copy-code/blob/7cbe2d4059492d7e80480cc3b54d2f0f16400325/index.js#L6-L8

  1. querySelectorAll returns a NodeList, and not all browsers provide a forEach method on NodeLists.

  2. Arrow functions are not support in IE (or older evergreen browsers).

Fixed by #3

jperasmus commented 6 years ago

Hi @jhildenbiddle, thanks for your contributions, it is much appreciated! I originally put this plugin together quickly for a specific use case we had targeting developers specifically on modern browsers. Thanks for your efforts to improve it.