Revert "Fix issue when JS is fired without element"

This reverts commit 0471b097416da2cec418a126c795cd5e8247fb93.