Add function support to interaction widget

Test Plan: hack hack hack

Reviewers: jack, charlie

Reviewed By: charlie

Subscribers: jack

Differential Revision: http://phabricator.khanacademy.org/D11319