1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-21 02:55:25 +02:00

refactor(frontend): scripts -> utility

This commit is contained in:
syuilo
2025-03-09 14:28:01 +09:00
parent f35eb0f6d9
commit be7e3b9a0c
464 changed files with 829 additions and 829 deletions

View File

@@ -0,0 +1,25 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
export const postMessageEventTypes = [
'misskey:shareForm:shareCompleted',
] as const;
export type PostMessageEventType = typeof postMessageEventTypes[number];
export type MiPostMessageEvent = {
type: PostMessageEventType;
payload?: any;
};
/**
* 親フレームにイベントを送信
*/
export function postMessageToParentWindow(type: PostMessageEventType, payload?: any): void {
window.parent.postMessage({
type,
payload,
}, '*');
}