-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
JQuery object isn't loaded/detected with new_instance enabled #7419
Comments
Related to #7344 |
I am pretty sure this is related to #7230 as well. |
Could you please provide a full sample (not code snippets) so I can reproduce? |
This error was happening on a relatively big project, so I'll create a new one for the purposes of the demo. Give me a sec |
@rogerwang Ok I've updated the post with a complete set of code to use |
Thanks. I can reproduce the issue. But it shouldn't block #7230 as it fails in nw1 mode too... |
@rogerwang Interesting. Thought it worked before for some reason. It probably did and broke at one point in NW1 phase |
Any potential updates on this? Don't want to be pushy or anything, just wondering if it will be anytime soon or if it's long down the queue. I'm working on something that relies on loading other Devs' work which could freeze or crash everything else if that window freezes |
will look to fix it soon |
Awesome! Keep up the good work! |
This is fixed in #7344 |
Something is still broken with this. I'm still investigating. Just got to update just now and tested it out and seems to be working fine at first, but there is some weird behaviour. Will update once I've figured it out |
Update: It's setTimeout(function(){ for some reason it's not working in my main project's iframe thats appended on runtime. I'm trying to reproduce it out on a new project but not having any luck with that yet, so thats strange. |
After a lot of debgugging a lot of code, I figured out at least one problem. Might be the only problem but setTimeout does not execute (or executes in some other context that I can't observe) in |
I forgot to tag @rogerwang |
Please file another issue. Thanks. |
NWJS Version : 0.44.5
Operating System : Linux
Expected behavior
All functions in other javascript scripts should be able to perform jquery tasks including $(...).addClass(....) etc.
Actual behavior
$ is not defined, bootstrap.js even reports that "Bootstrap's JavaScript requires jQuery" meaning it can't find it either. None of my scripts can.
No, I don't use the require() way, I use the <script> tag to load jQuery. Saw this being a problem from me looking into this anyway.
I am assuming this is some side effect with the implementation of contexts?
How to reproduce
Create a new window using new_instance = true
import jQuery as <script>
Try anything jquery related in your js file thats also loaded using <script> tag in the html file
Ok here is a complete code to test with:
jquery demo.zip
The text was updated successfully, but these errors were encountered: