-
Notifications
You must be signed in to change notification settings - Fork 4
Description
requirejs hangs forever on a css!file requirement in PhantomJS because of a known issue: onload event not fired for stylesheets · Issue #12332 · ariya/phantomjs.
The problem is in _isEventSupported that (more or less) comes from Detecting event support without browser sniffing — Perfection Kills. this._isEventSupported("link", "load") returns true for phantomjs even though it never actually fires :-(
I don't know that there is solution short of navigator.userAgent sniffing. I understand if you don't want that in your code, but reality is that for us, the initial require of many modules never returns and so none of our JavaScript is ever executed leaving an empty page in PhantomJS.
So should this._isEventSupported("link", "load") return false based on navigator.userAgent.match(/PhantomJS/)? Or should one white list the browsers where this._isEventSupported() is known to work instead? Not a pleasant choice to have to make...