mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
15 lines
303 B
JavaScript
15 lines
303 B
JavaScript
// API methods
|
|
function play(data) {
|
|
// ...
|
|
}
|
|
function pause(data) {
|
|
// ...
|
|
}
|
|
|
|
window.addEventListener("message", (ev) => { // $ Source
|
|
let message = JSON.parse(ev.data);
|
|
|
|
// Let the parent frame call the 'play' or 'pause' function
|
|
window[message.name](message.payload); // $ Alert
|
|
});
|