-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read property 'addRule' of undefined #34
Comments
Your pages need to at least have |
sorry, I add the body of the question late... |
it seem that wcjs-player just can get element located at main html, at child html cannot get the element define in it, and if I am not define the <style></style> in main html, will report TypeError: Cannot read property 'addRule' of undefined, and if I do it, and define in child html, will report "Uncaught TypeError: Cannot read property 'firstChild' of null".Do you have demo about using wcjs-player with nwjs play video in child html? |
I think that's a NW.js bug, it's possible that when you call I've seen NW.js doing this a few times in other circumstances. |
Try setting a timeout on |
Also try loading it after the document is ready... |
I try like below:
but it still report "Uncaught TypeError: Cannot read property 'firstChild' of null". |
and I try with JQuery, test like below in child window. it works.
do you have any route to avoid this circumstances? |
try |
define div in child html like below:
then
report
|
That makes no sense.. if you look at line You will see:
in your case, this results to:
and the error says that:
is |
Are you by any chance doing |
code like below:
player.html
|
So you have 2 players? One in your parent window and one in a child window? |
just have one player in player.html |
using electron work well... |
Hi, I had the same issues when using version 0.13.0-beta4 of nwjs. So I decided to downgrade to 0.12.3 and everything seems to work now. |
@OancaAndrei, any reason to use beta instead of stable? |
No reason at all actually, I simply wanted to have the latest build. I didn't expect it to not work and because the issue wasn't really solved I thought to share my (let's say) solution. |
@OancaAndrei did you build |
It's possible that NW.js 0.13.0 didn't work for you because you built |
I used the prebuilt one and I might had forgot to change the version when recompiling... I remember changing it when compiling for electron but not for nwjs. I'll check it now. |
I tried recompiling webchimera.js for nwjs v0.13.0-beta4 but unfortunately it doesn't work. The linker complains about some not found links. Here's the log:
Am I missing something? Earlier with prebuilt I meant that I was using the prebuilt distribution of NW.js. So yes, I was compiling |
@RSATom do you think these errors from nw.js 0.13 are also related to the vmem issue? |
No. I think it's cmake-js issue. |
@OancaAndrei, are you really need NW.js beta? tbh, I'm a little bit limited in free time, so don't know when will be able look at it. If you really need it, please create issue at https://github.com/RSATom/WebChimera.js/issues |
Oh, don't worry about it. I won't use the 0.13 version until it gets out from beta stage. BTW, thanks for your great work, both of you, @RSATom and @jaruba. |
@OancaAndrei, good, thank you. |
Using macx64, nwjs, wcjs-player, and I want to open child windows using var gui = require("nw.gui"); and gui.Window.open('player.html');
when child window onload i will init the wcjs-player to play video
The text was updated successfully, but these errors were encountered: