alex-seville / blanket

blanket.js is a simple code coverage library for javascript. Designed to be easy to install and use, for both browser and nodejs.
http://blanketjs.org
Other
1.4k stars 177 forks source link

Add `document.currentScript` support #558

Open jbutz opened 8 years ago

jbutz commented 8 years ago

If the last script to load is not Blanket then data attributes can't be retrieved. Many modern browsers have support for document.currentScript which gives you the script tag for the currently executing script.

I have modified config.js to to make use of document.currentScript if it exists.