Add currentScript to document in browser's def