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

Incorrect prototype for EditSession.getMarkers return object #3173

Closed
ahirschberg opened this issue Dec 21, 2016 · 2 comments
Closed

Incorrect prototype for EditSession.getMarkers return object #3173

ahirschberg opened this issue Dec 21, 2016 · 2 comments

Comments

@ahirschberg
Copy link

Issue:

The documentation for EditSession.getMarkers (link) states that it should return a JavaScript Array. However, it returns an "arraylike" plain javascript object instead, i.e. it's prototype is Object instead of Array.

This is an issue for people using acejs in languages such as TypeScript or Dart, where the interop layer between the the target language and ace.js cannot convert the return type correctly.

@nightwing
Copy link
Member

this is a bug in the documentation, it is supposed to return an object.

@ahirschberg
Copy link
Author

Why wouldn't it return an array, though? It is, after all, giving you a list of markers with indicies.

Is it because the integer keys are the marker ids and not necessarily sequential? That makes sense, I didn't think about that

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