Skip to content

Check if element '#icon' already is created #18

@Sandstedt

Description

@Sandstedt

Currently mojs-player creates an element in the top of body that looks like this:

<div id="icons">
  <svg ...>
    <path id="play-icon-shape" d="...">
    ...
  </svg>
</div>

This is for using svg elements as icons in the player controller.

Problem
When using mulitple instances of mojs-player on the same page, we get dublicates of these elements.

Solution
Should be easy to check if the element already excist in the dom before creating it again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions