Put Javascript call after 'yield'