Skip to content

Conversation

daun
Copy link
Member

@daun daun commented Sep 25, 2024

Description

Document new hooks option for registering handlers in constructor:

const swup = new Swup({
  hooks: {
    'visit:start': () => console.log('starting visit'),
    'page:load': () => console.log('loaded page'),
    'visit:end': () => console.log('finished visit')
  }
})

Checks

  • The PR is submitted to the master branch
  • The code was linted before pushing (npm run lint)
  • All tests are passing (npm run test)
  • New or updated tests are included
  • The documentation was updated as required

@netlify
Copy link

netlify bot commented Sep 25, 2024

Deploy Preview for splendorous-kataifi-9ae281 ready!

Name Link
🔨 Latest commit 6355cd5
🔍 Latest deploy log https://app.netlify.com/sites/splendorous-kataifi-9ae281/deploys/66f577104e7160000933342f
😎 Deploy Preview https://deploy-preview-205--splendorous-kataifi-9ae281.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@daun daun requested a review from a team September 25, 2024 19:03
@daun daun changed the title Add documentation for hooks option Add documentation for hooks option Sep 25, 2024
@daun daun merged commit 3351e63 into master Sep 26, 2024
5 checks passed
@daun daun deleted the content/hooks-option branch September 26, 2024 15:10
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.

2 participants