<p>I have a web application that uses Ext-JS 2.2. In a certain component, we have an empty toolbar that we are trying to add a button to using </p>

<pre><code>myPanel.getTopToolbar().insertButton(0, [...array of buttons...]);
</code></pre>

<p>However, in IE6/7 this fails because of lines 20241-20242 in ext-all-debug.js:</p>

<pre><code>var td = document.createElement("td");
this.tr.insertBefore(td, this.tr.childNodes[index]);
</code></pre>

<p>Since "this.tr.childNodes([0])" does not yet exist in IE, this fails with "Invalid argument".</p>

<p>THE REAL QUESTION:
Can I, using CSS similar to the below add a child to every toolbar &lt;tr&gt; so that this.tr.childNodes[0] is found:</p>

<pre><code>div.x-toolbar tr:after { content: " "; }
</code></pre>

<p>I totally realize this is a hack, but for legal reasons I cannot change any Javascript, not even to add an empty button ({}) to each toolbar. Major kudos to anyone that can figure this out.</p>

If all you are doing is adding to a empty panel
```
```
myPanel.getTopToolbar().add(buttons etc);
```
```
Or
```
```
myPanel.getTopToolbar().addButton(..);
```
```
Either should work.  It looks like purpose of insertButton is for putting a button within a non-empty toolbar.