I'd like to copy the content of this for-loop into clipboard:

```
<div ref="text" class="links">
        <div class="row" v-for="(name, index) in resultNames" :key="index" >                                    
            <p>{{makeUrl(name)}} </p>
        </div>   
</div>  
<button   @click="handleCopy">Copy to Clipboard</button> 

```

I followed [this](https://stackoverflow.com/a/45041489/517235) answer and came up with this method:

```
  handleCopy() {
     this.$refs.text.select();
     document.execCommand('copy');
    }

```

But this results in:

```
Uncaught TypeError: this.$refs.text.select is not a function

```

So I'm left clueless how can I solve this withouth using third party javascript plugins? 

**P.S.** I tried some JS specific suggested answers, like [this](https://stackoverflow.com/questions/1173194/select-all-div-text-with-single-mouse-click/1173319#1173319), but get error:

```
Uncaught TypeError: Failed to execute 'selectNode' on 'Range': parameter 1 is not of type 'Node'.

```