the easy solution was to add the `js_widget_wrapper` class to the frame. I like the idea of using the directive to return a link function, but it seems like an unnecessary amount of code being added just to push this function somewhere else (and duplicate it — it's being used in both directives). what are your thoughts?