Jump to content


Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.

Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I put together a codepen for this issue but the codepen appears to work fine. I've attached a copy of the error message I'm seeing in the console and the script is definitely failing to run correctly on the site I'm building. Any thoughts as to why this is working on codepen but not on the site?


See the Pen OMZBox by ajmiller (@ajmiller) on CodePen

Link to comment
Share on other sites

I'm shooting blind here, since i cant see your test sites code for context. But maybe the window or the instance of the element your passing to SplitTextPlugin is not available or ready. When you look in the console and network panel do you see the scripts loading before the DOM and or window is loaded and ready?


maybe the element isnt ready or available? You could try and check the length of the element and make sure it is larger than 0, meaning it exists in the DOM, before doing anything with the element.



  • Like 4
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.