<pre class="docs-method-signature"><code>element.insertPort(before, port, [opt])</code></pre>

Insert a new port before another port, where `port` could be defined as described in section [Port interface](#dia.Element.ports.interface) and `before` is either an index, port id or port itself.
