widgeting
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 27s Details

This commit is contained in:
Ladd Hoffman 2024-04-25 17:50:10 -05:00
parent b7a880322f
commit 9b44c5bf21
2 changed files with 9 additions and 4 deletions

View File

@ -14,6 +14,14 @@ window.addEventListener(
console.log('window message', event);
},
);
window.parent?.addEventListener(
'message',
(event) => {
if (event.data?.target?.startsWith('metamask')) return;
console.log('parent window message', event);
},
);
</script>
</head>
<body>

View File

@ -255,13 +255,10 @@ function Widget() {
useEffect(() => {
console.log('window.location', window.location);
widgetApi.current = new WidgetApi('50aaf929-a90d-4507-9ecc-cd0620d1c780', window.parent);
widgetApi.current = new WidgetApi('50aaf929-a90d-4507-9ecc-cd0620d1c780');
console.log('widget api', widgetApi.current);
console.log('._events', widgetApi.current._events); // eslint-disable-line no-underscore-dangle
console.log('.transport._events', widgetApi.current.transport._events); // eslint-disable-line no-underscore-dangle
// widgetApi.current.requestCapability(MatrixCapabilities.AlwaysOnScreen);
widgetApi.current.requestCapabilities([