The Higgins Javascript Policy Context Provider implements the Identity Attribute Service IdAS Interfaces and allows insertion of Javascript into select IdAS calls.
Additional Documentation
See the Wiki