-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinspect-api.cjs
More file actions
27 lines (23 loc) · 805 Bytes
/
Copy pathinspect-api.cjs
File metadata and controls
27 lines (23 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const { DesktopWidget } = require('@osmn-byhn/widget-core');
const fs = require('fs');
try {
const widget = new DesktopWidget('about:blank', {
width: 100,
height: 100,
x: 0,
y: 0,
interactive: true
});
const proto = Object.getPrototypeOf(widget);
const methods = Object.getOwnPropertyNames(proto).filter(name => typeof widget[name] === 'function');
const properties = Object.getOwnPropertyNames(widget);
console.log('--- WIDGET CORE API ---');
console.log('Methods:', methods);
console.log('Properties:', properties);
// Clean up if it actually created a window
if (widget.deactivate) widget.deactivate();
process.exit(0);
} catch (e) {
console.error('Error inspecting widget-core:', e.message);
process.exit(1);
}