-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Loading via browser and the Universal Module Definition #2941
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
Comments
This is not a CDN issue, per se. The issue is whether xterm addons should be loadable without a module system, using a |
@lachdoug I know that this issue is not about CDN in the first place, still your snippet contains/shows that, and thats the reason why I called it out. Those snippets are often used as copy blueprints, even by long-standing web developers which should know better. Imho the only usecase, where loading xterm.js exact that way makes any sense, is an in-browser only REPL, that does not try to to talk to an outside shell. Or from a teachers perspective - combining a slightly enhanced version of that snippet with aspects about web security with proper SRI usage, building a chain of trust etc. would at least give your kids the chance to understand the risk and enable them to decide on their own whether they go the secure or insecure way later on. Giving them this snippet without any security context is like handing a sharp knife to a child without telling about the handle and the blade - it will grab right into the blade. Ofc its not up to me to tell you how to teach your kids, its just whats on my mind regarding xterm.js and insecure CDN usage. |
These kids are 12 and 13. Some of them can't remember how to open their text editors. I'm not going to be talking with them about 'chains of trust'. We're just playing around with a bit of ASCII art. |
👍 |
+1
|
This comment has been minimized.
This comment has been minimized.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment has been minimized.
This comment has been minimized.
This comment was marked as off-topic.
This comment was marked as off-topic.
Closing in favor of #2878 |
In Issue #2499 it was asked why addons don't work when loaded by browser from a CDN.
Addons are supposed to work as so:
But the UMD returns an object, so it's necessary to do this:
Here's a full example:
The UMD conditions are:
Perhaps the last line should be
root["FitAddon"] = factory()["FitAddon"];
.The text was updated successfully, but these errors were encountered: