Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impress.js script now runs when page load is complete #360

Closed
wants to merge 1 commit into from
Closed

Impress.js script now runs when page load is complete #360

wants to merge 1 commit into from

Conversation

edu791
Copy link

@edu791 edu791 commented Jan 6, 2014

Added a window.onload event for all the impress.js script,
so now you can load the impress.js script tag from head. There's no need to load it from the end of the body tag.

Added a window.onload event for all the impress.js script, 
so now you can load the impress.js script tag from head. There's no need to load it from the end of the body tag.
@FagnerMartinsBrack
Copy link
Member

@ericnelsonaz The semicolon in the end is not superfulus, if it is included via script tag and another script tag right below uses an Immediately Invoked Function Expression ((function () {}());), then it will interpreted as an argument for the previous Function Declaration if the semicolon is omited:

window.onload = function() {
  // This is immediately executed and pass the IIFE result as an argument.
}(function () {}());

@FagnerMartinsBrack
Copy link
Member

@eduardrock The only thing impress.js does is to provide the API, how it will be loaded is the responsibility of the developer. It doesn't make sense coupling impress.js into a single way to load the script by default because a user might want to load it in a different way.

@FagnerMartinsBrack
Copy link
Member

FagnerMartinsBrack commented Mar 5, 2016

Closing due to the lack of feedback from the OP. If you want to work in the PR again, feel free to comment here to open up the discussion again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants