I can't access HTMLCollection Type When I use getElementsByClassName.

I wanna get the length but I can't get that

```
var documentHeader = parent.document.all['header'];
var motionClass = documentHeader.getElementsByClassName('motion');

```

this is a result of motionClass

```
HTMLCollection []
 0: div.motion
 length: 1
 __proto__ : HTMLColletion

```

If I access length result is 0

How can I result This Issue?