if (containerElem instanceof HTMLIFrameElement)
((HTMLIFrameElement)containerElem).setSrc(url);
else if (containerElem instanceof HTMLObjectElement)
{
// <param name="src" value="url" />
HTMLParamElement param = (HTMLParamElement)ItsNatTreeWalker.getFirstChildElement((HTMLObjectElement)containerElem);
String type = containerElem.getAttribute("type");
if (type.equals("application/x-java-applet"))
{
param.setValue(url); // <param name="src" value="url" />
}
else
{
// Para MSIE
((HTMLObjectElement)containerElem).setAttribute("src",url);
param.setValue(url); // <param name="src" value="url" />
((HTMLObjectElement)containerElem).setData(url);
}
}
else if (containerElem instanceof ItsNatHTMLEmbedElement)
{
((ItsNatHTMLEmbedElement)containerElem).setAttribute("src",url); // No funciona en MSIE
}
else // HTMLAppletElement
{
HTMLParamElement param = (HTMLParamElement)ItsNatTreeWalker.getFirstChildElement((HTMLAppletElement)containerElem);
param.setValue(url); // <param name="src" value="url" />
}
}