/* Instantiate the {{ widget_name }} class. */
/* The IDs given should match those used in the template above. */
function create_widget() {
  var frame_data = {{ frames | safe }};
  var anim = new HoloViews.{{ widget_name }}(frame_data, {{ Nframes }}, "{{ id }}", {{ delay }}, {{ load_json }}, "{{ mode }}", {{ cached }}, "{{ json_path }}", {{ dynamic }}, "{{ plot_id }}");
  HoloViews.index['{{ plot_id }}'] = anim;
}

create_widget();

{{ init_js }}
