Skip to content

Commit c1d5fba

Browse files
committed
life-game.jsにもshowToast関数を追加
1 parent 9960bdf commit c1d5fba

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/iframe/life-game.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,3 +279,13 @@ on.apply_board = (newBoard) => {
279279
renderBoard();
280280
generationChange(0);
281281
};
282+
283+
function showToast(jMessage, eMessage) {
284+
window.parent.postMessage(
285+
{
286+
type: "show_toast",
287+
data: { japanese: jMessage, english: eMessage },
288+
},
289+
"*",
290+
);
291+
}

0 commit comments

Comments
 (0)