-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I am trying your code in a webix app. However in the function:
function createWindowFromIframe(element) {
var win = getWindowFromElement(element);
var callbackKey = "create-blockly-" + (new Date).getTime();
var iframeWin = null;
win[callbackKey] = function(callbackWin) {
delete win[callbackKey];
iframeWin = callbackWin;
};
iframe({
container: element,
html: iframeHtml.replace("{{callbackKey}}", JSON.stringify(callbackKey))
});
return iframeWin;
}
iframeWin is of course null. Then in instantiateBrowserCode, the function is called with window = null resulting in the error:
function instantiateBrowserCode(code, window) {
var mockGoog = {require: function(){}, provide: function(){}};
var creator = new Function(["window", "document", "Blockly", "goog"], code);
creator.apply(window, [window, window.document, window.Blockly, mockGoog]);
}
Am I missing something? See: https://github.com/halcwb/GenPDMS/blob/blockly/client/src/controllers/ruleEditor.js
P.s. $$("rule_editor").getNode() returns a regular div. In fact, an iframe in that div get's created!
Metadata
Metadata
Assignees
Labels
No labels