mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 11:44:10 +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,9 +6,13 @@
|
||||||
function xDeprecate(funcName) {
|
function xDeprecate(funcName) {
|
||||||
var msg = 'DEPRECATED : '+funcName+'() is deprecated in Rhymix.';
|
var msg = 'DEPRECATED : '+funcName+'() is deprecated in Rhymix.';
|
||||||
if (typeof console == 'object' && typeof console.warn == 'function') {
|
if (typeof console == 'object' && typeof console.warn == 'function') {
|
||||||
|
if (navigator.userAgent.match(/Firefox/)) {
|
||||||
|
console.error(msg);
|
||||||
|
} else {
|
||||||
console.warn(msg);
|
console.warn(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var xOp7Up,xOp6Dn,xIE4Up,xIE4,xIE5,xIE6,xNN4,xUA=navigator.userAgent.toLowerCase();
|
var xOp7Up,xOp6Dn,xIE4Up,xIE4,xIE5,xIE6,xNN4,xUA=navigator.userAgent.toLowerCase();
|
||||||
if(window.opera){
|
if(window.opera){
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,12 @@
|
||||||
|
|
||||||
// Display deprecation notice.
|
// Display deprecation notice.
|
||||||
if (typeof console == "object" && typeof console.warn == "function") {
|
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.
|
// Define callback functions.
|
||||||
|
|
@ -87,7 +92,12 @@
|
||||||
// This way of calling an error handler is deprecated. Do not use it.
|
// This way of calling an error handler is deprecated. Do not use it.
|
||||||
if ($.isFunction($.exec_xml.onerror)) {
|
if ($.isFunction($.exec_xml.onerror)) {
|
||||||
if (typeof console == "object" && typeof console.warn == "function") {
|
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);
|
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() {
|
window.exec_html = $.fn.exec_html = function() {
|
||||||
if (typeof console == "object" && typeof console.warn == "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!
|
// This function is deprecated!
|
||||||
if (typeof console == "object" && typeof console.warn == "function") {
|
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.
|
// Create the hidden iframe.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue