Bug 1141752 - Do not use non-standard flag argument of String.prototype.replace in battery-interface-idlharness.html. r=Ms2ger

This commit is contained in:
Tooru Fujisawa 2015-03-12 02:29:54 +09:00
parent 0ff5a2ae30
commit 286bceed09

View File

@ -41,7 +41,7 @@ var idl_array = new IdlArray();
var idls;
[].forEach.call(document.querySelectorAll('script[type=text\\/plain]'), function(node) {
// replace 'EventHandler' and 'unrestricted double' unrecognized by idlharness.js
idls = node.textContent.replace('EventHandler', 'Function?', 'g').replace('unrestricted double', 'double', 'g');
idls = node.textContent.replace(/EventHandler/g, 'Function?').replace(/unrestricted double/g, 'double');
idl_array[(node.className === 'untested') ? 'add_untested_idls' : 'add_idls'](idls);
});
idl_array.add_objects({Navigator: ['navigator'], BatteryManager: ['navigator.getBattery()']});