Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think it's just document.currentScript

I used it years ago because we had an XML based templating engine and some "components" needed to inject little scripts to add functionality. I could have given everything unique IDs but this was more fun. Forget what I did with it but I need to know where it was in the DOM or something.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: