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

global scope javascript functions such as "remove" #409

Open
photomedia opened this issue Oct 24, 2024 · 3 comments
Open

global scope javascript functions such as "remove" #409

photomedia opened this issue Oct 24, 2024 · 3 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@photomedia
Copy link

photomedia commented Oct 24, 2024

I recently encountered an issue of compatibility with other plugins due to the fact that prototype is defining functions like "remove" at the global scope.

This causes problems when others also define a function like "remove". I am referring specifically to this as an example:

https://trustcassie.com/

which is used in my institution for cookie permissions handling. Overall, I think that a best practice would be to contain function names like "remove" within a scope, or at least use names with a prefix or something like that. That goes for the third-party apps too, obviously, but I can't control what they do.

@drn05r drn05r self-assigned this Nov 11, 2024
@drn05r drn05r added the bug Something isn't working label Nov 11, 2024
@drn05r drn05r added this to the 3.4.7 milestone Nov 11, 2024
@drn05r
Copy link
Contributor

drn05r commented Nov 11, 2024

I will take a look at scoping. However, ultimately PrototypeJS will be completely removed in the next major release of EPrints.

@photomedia
Copy link
Author

Thank you for adding that to a milestone. I realize that it might not be a simple fix, because it is a core library for EPrints now, so it could be referenced all over the place.

"ultimately PrototypeJS will be completely removed in the next major release of EPrints" that is great news!

Do you mean by "next major release" EPrints 3.5?

@drn05r
Copy link
Contributor

drn05r commented Nov 11, 2024

Yes, 3.5. However, there is no release date scheduled for that yet.

@drn05r drn05r modified the milestones: 3.4.7, 3.4.x Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants