I have a template that I'm cloning in an iteration by document.importNode. What I can not do is to add a class to the cloned element.

```
var t = document.querySelector('#template');
var clone = document.importNode(t.content, true);
document.querySelector('#target').appendChild(clone);
clone.classList.add('glyphicon glyphicon-search'); // error thrown here, classList is undefined

```

What is a cloned node exactly? The console it says it is a #document-fragment. How can I get the created element from the clone without using querySelector and indexing the cloned nodes?

The template looks like this one:

```
<template id="template">
    <div class="row">
        <div class="col-xs-3 no"></div>
        <div class="col-xs-6 no2"></div>
        <div class="col-xs-3 quantity"></div>
    </div>
</template>

```