With spam being such a big deal I would stick to sending out basic emails that are easily consumable. You can always link to a webpage which has your javascript in it. You can also send a querystring parameter in the URL to track the users who are most interested in your emails because this will tell you they are click into them. So while it may be possible, its probably best to avoid it.