// (C) Copyright 2020 Hewlett-Packard Enterprise Company, L.P.

define(['jquery'], function() {
    (function($) {
        // jQuery plugin definition
        
        $.fn.hpSafeClone = function() {
            if ($('html').hasClass('ie8')) {
                // handle node having HTML5 tags in ie8
                var loader = document.getElementById('hp-html5-loader');
                loader.innerHTML = $(this).wrap('<div></div>').parent().html();
                return $(loader.firstChild);
            } else {
                return $(this).clone();
            }
        };
    }(jQuery));
});
