Hi there,
so one of the things the off canvas script does is to toggle the slide-opened
class on the body ( and HTML ) elements.
If you’re using CSS Animations then you could simply use that class in your CSS.
If you’re using JS then you can in your own eventListener check if the class is on the body:
document.body.classList.contains("slide-opened")
This may be slightly better then listening for the Hamburger click, as the click adds the Class and that class is used to display the off canvas. This avoids the animation running before the off canvas is actually open.