I have a HTML 5 player app that has a requirement to load all of its skin elements programmatically. 

I am attempting to add a Google Cast button to the skin. To do this I have the following code: 

```
var castButton = document.createElement("button");
castButton.setAttribute("is", "google-cast-button");

```

this button is appended to the page and appears within the DOM on inspection. The problem I am having his that the framework des not recognise it as the cast button. So when clicking it no devices are listed. 

In the chromecast chrome API docs it states [cast docs](https://developers.google.com/cast/docs/chrome_sender_integrate#cast_button) that I can create the button using 

```
document.createElement("button", "google-cast-button");

```

I am not able to use the second argument as I'm working in typescript and it has no knowledge of the second argument.

an example of the problem I am having in it's simplest form can be found here 

[Typescript playground](http://www.typescriptlang.org/play/#src=class%20Cast%20%7B%0D%0A%20%20%20%20myButton%3A%20HTMLButtonElement%3B%0D%0A%20%20%20%20constructor()%20%7B%0D%0A%20%20%20%20%20%20%20%20this.myButton%20%3D%20document.createElement(%22buton%22)%20as%20HTMLButtonElement%3B%0D%0A%20%20%20%20%20%20%20%20%2F%2F%20google%20documentation%20would%20have%20me%20do%20document.createElement(%22buton%22%2C%20%22google-cast-button%22)%0D%0A%20%20%20%20%20%20%20%20document.body.appendChild(this.myButton)%3B%0D%0A%20%20%20%20%7D%0D%0A%7D%0D%0A%0D%0Alet%20cast%20%3D%20new%20Cast()%3B%0D%0Acast.myButton.onclick%20%3D%20function()%20%7B%0D%0A%20%20%20%20alert(%22cast%20click%22)%3B%0D%0A%7D%0D%0A%0D%0A)

When '\_\_onGCastApiAvailable' is called by the framework when it has successfully loaded, the button should be set as the cast button but is not.

If I add a simple button to the HTML

```
<button id="cast-start" is="google-cast-button" style="width: 30px;"></button>

```

This works?

Is there something I'm missing or is the documentation wrong?