Skip to content

Commit

Permalink
-modified onload override
Browse files Browse the repository at this point in the history
Client sites where getting their unload event listener knocked off
  • Loading branch information
tapsey committed Jul 12, 2017
1 parent fd25eb2 commit cfbebc0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/js/getmdl-select.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
'use strict';
window.onload = function () {
window.addEventListener ?
window.addEventListener("load",whenLoaded,false) :
window.attachEvent && window.attachEvent("onload",whenLoaded);

function whenLoaded() {
getmdlSelect.init('.getmdl-select');
document.addEventListener("DOMNodeInserted", function (ev) {
if (ev.relatedNode.querySelectorAll(".getmdl-select").length > 0) {
Expand Down

0 comments on commit cfbebc0

Please sign in to comment.