Skip to content
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

Prototype is no longer compatible with Vue.js #362

Open
Sublime1 opened this issue Nov 2, 2023 · 2 comments
Open

Prototype is no longer compatible with Vue.js #362

Sublime1 opened this issue Nov 2, 2023 · 2 comments

Comments

@Sublime1
Copy link

Sublime1 commented Nov 2, 2023

I know this project is no longer maintained, but who knows what the future holds? I'm creating this issue to gather thoughts on the fact that Prototype is no longer compatible with Vue.js since version 3.2.46

There is a workaround kindly provided by sodatea - putting the following lines before the first call to createApp fixes the issue:

const iframe = document.body.appendChild(document.createElement("iframe"));
const iframeArray = iframe.contentWindow.Array;
document.body.removeChild(iframe);
Array.from = iframeArray.from
@jwestbrook
Copy link
Collaborator

You should be able to simplify the workaround using this comment. Meaning no need to load an iframe just to get the browser Array.from.

Another way is to self host the prototype.js file and comment/delete line 1114. $A is used throughout the Prototype codebase versus using Array.from

(We might be able to convince @savetheclocktower to issue 1.7.3.1 that removes that line, but thats up to him)

@Sublime1
Copy link
Author

Sublime1 commented Nov 3, 2023

Hi Jason, thanks for the helpful response. In fact, you've convinced me that self hosting is probably a better way to go, because I see that there is also are a few PRs to fix a CVE issue. (I'm not actually sure which PR has the best fix.)

As I said to Thorsten over on the Vue issue, I was surprised to see how widely used Prototype still is. It's a real shame that the Prototype maintainers feel they can't bring out a new version (and I'm sure their reasons are solid). My Javascript skills are well below the level needed, but I'm sure there would be a big welcome for a new release.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants