display 변경시 추적

hanahana·2025년 7월 17일
// show 추적
const originalShow = $.fn.show;
$.fn.show = function() {
  console.trace('[TRACE] .show() called on:', this);
  return originalShow.apply(this, arguments);
};

// hide 추적
const originalHide = $.fn.hide;
$.fn.hide = function() {
  console.trace('[TRACE] .hide() called on:', this);
  return originalHide.apply(this, arguments);
};

// css 'display' 변경 추적
const originalCss = $.fn.css;
$.fn.css = function() {
  if (arguments[0] === 'display') {
    console.trace(`[TRACE] .css('display', ${arguments[1]}) called on:`, this);
  }
  return originalCss.apply(this, arguments);
};
profile
hello world

0개의 댓글