Prevent duplicate additions of HTML markup added in a JavaScript function

The bug is that was adding more checkboxes every time autosave ran!

drupal 8 get ID of checkboxes container jquery ensure dom updated before next method operates jquery ensure each runs after previous each drupal 8 #pre_render

Ancient answers…

No this can’t be a good idea.

This was fixed with