feross / feross/yt-player

Why using Ids?

Open
#69 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
689
Forks
63
PR merge metrics
No merged PRs in 30d

Description

Why do you use an id to create the api.player?
We can provide a selector or an element.
Then you search for the corresponding element to find its id to pass to api.player constructor.
If we provide an element, you are searching for it's ID to provide to api.player so that it can search for the element!

Problem is, in a Virtual DOM, the api.player cannot access the inner element of a virtual DOM. Passing the element itself solves the problem.

Thanks.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.