-
-
Notifications
You must be signed in to change notification settings - Fork 425
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
Datatables fails to load as a script when require.js is present #213
Comments
I've covered some points about this in my comment here, but to keep this topic here - in a Require environment DataTables does not automatically expose itself in the global scope, which I think it typical and correct for AMD modules. I'm not sure what the correct thing to do here is. Require is loaded, but it isn't being used. If it were used, then it would work. If it weren't loaded, the above would work. It is the combination of the two - Require being loaded, but expecting it to work globally, that is the issue. I've opened an issue to see if we can get feedback about this from the Require JS folk. |
Yes, that's it. Thank you Allan! |
We've had a reply in that thread now noting:
So at this time, I won't be making any changes to our UMD to register DataTables globally and with AMD at the same time. |
Sure, makes sense... and also I agree that my question (the heterogeneity of the environments in which Jupyter notebooks are rendered) is very specific. Anyway, thank you so much for considering it! |
On the plus side, I've been making good progress with ES modules recently. Going on to be in holiday next week, but should have something to show after that. |
Awesome! Keep me posted... and have a great holiday! |
This is a follow-up on this comment.
In some cases (and I don't have control on that), require.js is present in my HTML document.
When this is the case I am not able to load datatables as a simple script element.
(I know I could use a
require.config
file, but I'd prefer not to make an exception on whether require.js is there or not)A minimal example that reproduces the issue is this one:
(the example works when the "require.min.js" library is removed)
Thanks!
The text was updated successfully, but these errors were encountered: