mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 11:44:10 +09:00
Use console.warn for JS deprecation notices so that the user can see a stack trace
This commit is contained in:
parent
0d8b8a51dd
commit
79dd9ae45e
2 changed files with 10 additions and 10 deletions
|
|
@ -5,8 +5,8 @@
|
||||||
**/
|
**/
|
||||||
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.log == 'function') {
|
if (typeof console == 'object' && typeof console.warn == 'function') {
|
||||||
console.log(msg);
|
console.warn(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,8 @@
|
||||||
window.exec_xml = $.exec_xml = function(module, act, params, callback_success, return_fields, callback_success_arg, fo_obj) {
|
window.exec_xml = $.exec_xml = function(module, act, params, callback_success, return_fields, callback_success_arg, fo_obj) {
|
||||||
|
|
||||||
// Display deprecation notice.
|
// Display deprecation notice.
|
||||||
if (typeof console == "object" && typeof console.log == "function") {
|
if (typeof console == "object" && typeof console.warn == "function") {
|
||||||
console.log("DEPRECATED : exec_xml() is deprecated in Rhymix. Use exec_json() instead.");
|
console.warn("DEPRECATED : exec_xml() is deprecated in Rhymix. Use exec_json() instead.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define callback functions.
|
// Define callback functions.
|
||||||
|
|
@ -86,8 +86,8 @@
|
||||||
if (data.error != "0") {
|
if (data.error != "0") {
|
||||||
// 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.log == "function") {
|
if (typeof console == "object" && typeof console.warn == "function") {
|
||||||
console.log("DEPRECATED : $.exec_xml.onerror() is deprecated in Rhymix.");
|
console.warn("DEPRECATED : $.exec_xml.onerror() is deprecated in Rhymix.");
|
||||||
}
|
}
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
@ -337,8 +337,8 @@
|
||||||
* Function for compatibility with XE's exec_html()
|
* Function for compatibility with XE's exec_html()
|
||||||
*/
|
*/
|
||||||
window.exec_html = $.fn.exec_html = function() {
|
window.exec_html = $.fn.exec_html = function() {
|
||||||
if (typeof console == "object" && typeof console.log == "function") {
|
if (typeof console == "object" && typeof console.warn == "function") {
|
||||||
console.log("DEPRECATED : exec_html() is obsolete in Rhymix.");
|
console.warn("DEPRECATED : exec_html() is obsolete in Rhymix.");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -451,8 +451,8 @@
|
||||||
function send_by_form(url, params) {
|
function send_by_form(url, params) {
|
||||||
|
|
||||||
// This function is deprecated!
|
// This function is deprecated!
|
||||||
if (typeof console == "object" && typeof console.log == "function") {
|
if (typeof console == "object" && typeof console.warn == "function") {
|
||||||
console.log("DEPRECATED : send_by_form() is deprecated in Rhymix.");
|
console.warn("DEPRECATED : send_by_form() is deprecated in Rhymix.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the hidden iframe.
|
// Create the hidden iframe.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue