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

Multiple instances does not work #74

Closed
viliusle opened this issue Jun 29, 2021 · 2 comments
Closed

Multiple instances does not work #74

viliusle opened this issue Jun 29, 2021 · 2 comments

Comments

@viliusle
Copy link
Collaborator

Multiple instances of Tobii does not work. Last will work, others - not.

Example:

<a href="https://img.youtube.com/vi/HHi8qOtHnhE/maxresdefault.jpg" class="first" data-group="first">
   First - this will not work
</a>
<a href="https://img.youtube.com/vi/HHi8qOtHnhE/maxresdefault.jpg" class="second" data-group="second">
   Second - this will work
</a>
const tobii_first = new Tobii({
  selector: '.first'
})
const tobii_second = new Tobii({
  selector: '.second'
})

This can be issue, when you want to track events, right now you get event from all objects, without knowing which exactly. (separate bug)

@midzer
Copy link
Owner

midzer commented Jun 29, 2021

I am unsure whether we want/can support multiple tobii instances.

Whats an exact use case?

@viliusle
Copy link
Collaborator Author

viliusle commented Jun 29, 2021

For example because of this bug: #75
But if we fix it, this becomes low priority or closed I guess.
Another idea is show console warning about multiple instances, so devs don't waste time doing it and not getting result they want?

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