Jump to content
Search Community

Constant logs in console.

benji.3s.money test
Moderator Tag

Go to solution Solved by benji.3s.money,

Recommended Posts

Hi,

 

This is something I've noticed a lot recently, I'm unsure if it;s normal or I'm doing something incorrectly.

 

We make use of GSAP and ScrollTrigger throughout the site, and it's added to our JS via NPM/Import to the JS files.

When looking at the browser console we're constantly getting an integer and an undefined being output to console.log from gsap-core.js

It's making things a little annoying to debug and bloating up the log screen.

 

Does anyone have any idea why GSAP would be doing this?

 

 

Screenshot 2023-02-27 at 12.53.37.png

Link to comment
Share on other sites

Hi,

 

Just out of curiosity, is this a project you started from scratch or you started working on an ongoing project?

 

As Cassie mentions there is no reason at all for the GSAP Core file to be throwing those console calls there. On top of that I just created a couple of very simple projects with the GSAP Core file using the version you mention and I don't get any logs in the console 🤷‍♂️

 

My best guess is that something in the code is actually causing those or if you're working on a project someone else started some time ago, that particular person did something that's causing those console calls, but I can guarantee you that this is not something that particular version was shipped with.

 

Happy Tweening!

Link to comment
Share on other sites

Okay, so after some further investigation I think it's limited to FireFox developer edition

Seems as though the logs only appear in that browser, not in Chrome or Safari. The logs specifically come from The _ticker function in gsap-core.js and more specifically this line is where FireFox flags the log output but clearly it's not a console.log.

 

You can see from a simple codepen it outputs a lot of logs whenever GSAP does its thing in Firefox Developer -

See the Pen mdPzJKp by GreenSock (@GreenSock) on CodePen

 

manual || (_id = _req(_tick)); //make sure the request is made before we dispatch the "tick" event so that timing is maintained. Otherwise, if processing the "tick" requires a bunch of time (like 15ms) and we're using a setTimeout() that's based on 16.7ms, it'd technically take 31.7ms between frames otherwise.
Link to comment
Share on other sites

10 minutes ago, benji.3s.money said:

You can see from a simple codepen it outputs a lot of logs whenever GSAP does its thing in Firefox Developer

I just tried this in FF Dev, and am not seeing anything gsap realated in the logs. I just updated my browser today, and nothing different. I wonder if you have a setting toggled in your Dev Tools in FF, but I couldn't find any that'd cause this.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...