Reputation: 51
My code is perfectly working with IE but its not working with safari.Clonenode() method is not working in safari . I have a code like this
function ApplyNowWizard_addVehicleTypeList(vehicleDOM)
{
oParent = $(this.data).get(0);
oParent.documentElement.appendChild(vehicleDOM.cloneNode(true).documentElement);
}
In safari vehicleDOM.cloneNode(true).documentElement give null.
Upvotes: 0
Views: 847
Reputation: 1075249
As documentElement
is a Document
field, I assume vehicleDOM
must be a Document
. Note the DOM specification comment about cloneNode
:
And, cloning
Document
,DocumentType
,Entity
, andNotation
nodes is implementation dependent.
Since what you really want is a clone of the document element anyway, it sounds like you may be better off cloning that rather than the Document
:
oParent.documentElement.appendChild(vehicleDOM.documentElement.cloneNode(true));
Upvotes: 2