Skip to content

Commit

Permalink
added some debug scripts
Browse files Browse the repository at this point in the history
SQUASHED: AUTO-COMMIT-src-client-debug.js,
  • Loading branch information
JensLincke committed Jun 17, 2024
1 parent c984534 commit c55bcbe
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/client/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ export function busyLogFocus(forTime=10, start, lastFocusedElement) {

}

/*MD # Some Interesting Debug Scripts... MD*/

/*
// TODO make funcition for it
Expand All @@ -93,6 +95,32 @@ lively.addEventListener("devfocus", document.body, "focusout", (evt) => {
*/

/*
import * as cop from "src/client/ContextJS/src/contextjs.js";
cop.layer(window, "ShowFocus").refineClass(HTMLElement, {
focus(...args) {
console.log(( performance.now() - window.timeStart) + " " + lively.debug.debugPrint(this) + ".focus" + lively.stack().frames.map(ea => ea._desc.replace(lively4url,"")).slice(4,-1).join("\n"))
return cop.proceed(...args)
},
blur(...args) {
console.log(( performance.now() - window.timeStart) + " " + lively.debug.debugPrint(this) + ".blur" + lively.stack().frames.map(ea => ea._desc.replace(lively4url,"")).slice(4,-1).join("\n"))
return cop.proceed(...args)
}
})
ShowFocus.beGlobal()
ShowFocus.beNotGlobal()
*/



0 comments on commit c55bcbe

Please sign in to comment.