This should now be merged with/replaced by function of the same name in pointerevent_support.js.