Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Huanyee

Can I use GSAP CSSRulePlugin with the website using Google Fonts?

Recommended Posts

As shown in the console of my Codepen, it seems that CSSRulePlugin is unavailable on sites using Google Fonts, as it will display the following error:

 

DOMException: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules at Object.getRule

 

Is there anyway for me to exclude the stylesheet or any other way to solve this issue?

(I'm sorry that I can't quite reproduce this issue because Codepen seems not to allow me to include Google Fonts in the CSS)

See the Pen bGNoWRV by eric-chuang (@eric-chuang) on CodePen

Share this post


Link to post
Share on other sites

Sorry for the bothering. I found out that I can just ignore the warning.

It seems that Google Fonts have already allowed Cross Origin in their headers: access-control-allow-origin:*

 

The issue might be caused by other elements.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×