Run code below.
var win = window.open('text.html');
Then there will be error, if test.html has nodejs code.
This wouldn't appear in v0.3.6.
This bug is caused by the commit: 8f99f3f
why the error is expected? or why is this a bug?
var newWindow = window.open('text.html');
var win = gui.Window.get(newWindow );
With these code, the win should be a Window Object. Then the user can use the win to operate the new opened window in the index.html. However, the gui.Window.get(newWindow) need node, and (force_on || is_file_protocol) stop the new window to integrate node.
Here is the error message from the console when I call the previous code:
I just have a try that remove (force_on || is_file_protocol). And everything work.
(force_on || is_file_protocol)
Thanks. But are you sure the offending commit is 8f99f3f ?
I think I can make sure, I remove the (force_on || is_file_protocol), (which will be false when using window.open('test.html')) then it will work. BTW v0.3.6 didn't have this bug.
this commit 1500e6d touches the logic for is_file_protocol too ...
Yeah, you are right then. I miss this, sorry... I think I should said it is the (force_on || is_file_protocol)
thanks for pinpointing the error :) I'll fix this in 0.3.7
@owenc4a4 please add it to test cases.
install Node for window.open() Windows
In previous v8 code, in the middle of loading, KURL returns about:blank
for invalid URL. So we simulate the same behaviour here.
reopen to track the test case.
test in app_tests/calls_across_window.