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