assets: Fix bug in elementsfrompoint-polyfill
Current implementation of polyfill for document.elementsFromPoint is buggy, so fix it to avoid js errors in old browsers.
Issue spotted thanks to sentry: https://sentry.softwareheritage.org/organizations/swh/issues/443/?project=13
Migrated from D2604 (view on Phabricator)