notiflix / Notiflix

Notiflix is a pure JavaScript library for client-side non-blocking notifications, popup boxes, loading indicators, and more that makes your web projects much better.

Home Page:https://notiflix.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEAT] - Calls to the methods of Notify, should return something useful

JenieX opened this issue · comments

commented

Is your feature request related to a problem? Please describe.

I always thought that setting the option ID would create a unique id for that instance, that I can later locate the element that got created.

Describe the solution you'd like

Probably not going to be a good solution to everyone to switch now to full unique IDs. 😄

Describe alternatives you've considered

const ID = Notify.info(
  'Hello',
  () => { alert('Goodby'); },
  { ID: 'test' },
);

console.log(ID); // test-1

After further reading on the awesome docs, using className would solve my issue. But maybe you'll consider this feature if possible at some point.

Thank you.

commented

Hello @JenieX,

I am planning to rewrite this library from scratch with modern technologies.

I will take your expectation as a note for that version (v4), and I am closing this ticket. (The current usage of id (prefix) is also something that I don't like as well 🥲)

Thank you,
Furkan