Skip to content
Snippets Groups Projects
Commit 62faf673 authored by Lehtinen Teemu's avatar Lehtinen Teemu
Browse files

Use window instead of window.parent

parent e7cb3b9f
No related branches found
No related tags found
No related merge requests found
......@@ -104,9 +104,9 @@ let Content = {
instructions: "This time the area on left does not have any visible content. However, this exercise defines a JavaScript function that can grant you points. Your task is to use the browser console to call the function like this: <code>giveMePoints();</code>",
html: "<div id=\"events\"></div>",
script: function giveMePoints() {
window.parent.postMessage('grade');
window.postMessage('grade');
},
selector: "$window.parent",
selector: "$window",
events: "message",
points: function ($element, config, event) {
if (event.originalEvent.data == 'grade') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment