MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / emitDiagLine

Function emitDiagLine

Ports/JavaScriptPort/src/main/webapp/port.js:562–581  ·  view source on GitHub ↗
(line)

Source from the content-addressed store, hash-verified

560 || (typeof self !== "undefined" && typeof self.importScripts === "function" && typeof process === "undefined"));
561
562function emitDiagLine(line) {
563 if (!__cn1PortDiagEnabled()) {
564 return;
565 }
566 if (global.console && typeof global.console.log === "function") {
567 global.console.log(line);
568 }
569 // Forward to main thread so Playwright (page.on('console')) can capture
570 // CN1SS output from the worker. Worker console.log is not always
571 // observable from the page context.
572 if (typeof global.postMessage === "function") {
573 try {
574 global.postMessage({ type: "log", message: String(line) });
575 } catch (postErr) {
576 if (global.console && typeof global.console.warn === "function") {
577 global.console.warn("emitDiagLine:postMessage failed: " + String(postErr && postErr.message ? postErr.message : postErr));
578 }
579 }
580 }
581}
582
583function wrapVirtualMethodWithDiag(className, methodId, marker) {
584 if (!jvm || !jvm.classes || !jvm.classes[className]) {

Callers 15

aliasGlobalToImplFunction · 0.85
ensureDisplayEdtFunction · 0.85
emitDisplayInitDiagFunction · 0.85
ensureKotlinUnitShimFunction · 0.85
port.jsFile · 0.85
emitFormInitLafDiagFunction · 0.85

Calls 5

__cn1PortDiagEnabledFunction · 0.85
warnMethod · 0.80
logMethod · 0.65
StringClass · 0.50
postMessageMethod · 0.45

Tested by

no test coverage detected