mw.Debug.profile: Tweak support check to handle PhantomJS
authorMatthew Flaschen <mflaschen@wikimedia.org>
Fri, 11 Jul 2014 04:40:40 +0000 (00:40 -0400)
committerMatthew Flaschen <mflaschen@wikimedia.org>
Fri, 5 Sep 2014 22:57:32 +0000 (18:57 -0400)
commit3520066a716b868e8eb7f182600e601007dd458d
tree06fdb88862147ed29d79f792d9a1a3bedbe90d06
parent566b6b2109cb95157b58bff533a1adf03b40f47e
mw.Debug.profile: Tweak support check to handle PhantomJS

* Latest PhantomJS (1.9.7) supports Array.prototype.map,
  Array.prototype.reduce, Array.prototype.filter, and
  document.createElementNS, but not Function.prototype.bind
* Check all of these in the init function, and if they're available
  continue (unless there's no profiling data) and initialize
  this.createSvgElement (previously done inline)
* Accordingly, rename buildRequiresES5 to buildRequiresBrowserFeatures
  and tweak message

Change-Id: If464b1093ec445afbb6c6b8c230e0e2669ad8c5c
resources/src/mediawiki/mediawiki.debug.profile.js