mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Use console.error() instead of console.warn() in Firefox, because it doesn't show stack trace for warnings
This commit is contained in:
parent
4e623b4b56
commit
0fde7eb7e7
2 changed files with 29 additions and 5 deletions
|
|
@ -6,7 +6,11 @@
|
|||
function xDeprecate(funcName) {
|
||||
var msg = 'DEPRECATED : '+funcName+'() is deprecated in Rhymix.';
|
||||
if (typeof console == 'object' && typeof console.warn == 'function') {
|
||||
console.warn(msg);
|
||||
if (navigator.userAgent.match(/Firefox/)) {
|
||||
console.error(msg);
|
||||
} else {
|
||||
console.warn(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,12 @@
|
|||
|
||||
// Display deprecation notice.
|
||||
if (typeof console == "object" && typeof console.warn == "function") {
|
||||
console.warn("DEPRECATED : exec_xml() is deprecated in Rhymix. Use exec_json() instead.");
|
||||
var msg = "DEPRECATED : exec_xml() is deprecated in Rhymix. Use exec_json() instead.";
|
||||
if (navigator.userAgent.match(/Firefox/)) {
|
||||
console.error(msg);
|
||||
} else {
|
||||
console.warn(msg);
|
||||
}
|
||||
}
|
||||
|
||||
// Define callback functions.
|
||||
|
|
@ -87,7 +92,12 @@
|
|||
// This way of calling an error handler is deprecated. Do not use it.
|
||||
if ($.isFunction($.exec_xml.onerror)) {
|
||||
if (typeof console == "object" && typeof console.warn == "function") {
|
||||
console.warn("DEPRECATED : $.exec_xml.onerror() is deprecated in Rhymix.");
|
||||
var msg = "DEPRECATED : $.exec_xml.onerror() is deprecated in Rhymix.";
|
||||
if (navigator.userAgent.match(/Firefox/)) {
|
||||
console.error(msg);
|
||||
} else {
|
||||
console.warn(msg);
|
||||
}
|
||||
}
|
||||
return $.exec_xml.onerror(module, act, data, callback_success, return_fields, callback_success_arg, fo_obj);
|
||||
}
|
||||
|
|
@ -338,7 +348,12 @@
|
|||
*/
|
||||
window.exec_html = $.fn.exec_html = function() {
|
||||
if (typeof console == "object" && typeof console.warn == "function") {
|
||||
console.warn("DEPRECATED : exec_html() is obsolete in Rhymix.");
|
||||
var msg = "DEPRECATED : exec_html() is obsolete in Rhymix.";
|
||||
if (navigator.userAgent.match(/Firefox/)) {
|
||||
console.error(msg);
|
||||
} else {
|
||||
console.warn(msg);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -452,7 +467,12 @@ function send_by_form(url, params) {
|
|||
|
||||
// This function is deprecated!
|
||||
if (typeof console == "object" && typeof console.warn == "function") {
|
||||
console.warn("DEPRECATED : send_by_form() is deprecated in Rhymix.");
|
||||
var msg = "DEPRECATED : send_by_form() is deprecated in Rhymix.";
|
||||
if (navigator.userAgent.match(/Firefox/)) {
|
||||
console.error(msg);
|
||||
} else {
|
||||
console.warn(msg);
|
||||
}
|
||||
}
|
||||
|
||||
// Create the hidden iframe.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue