Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7792921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:19:27+00:00 2026-06-01T22:19:27+00:00

http://www.phpied.com/when-is-a-stylesheet-really-loaded/ Using this solution has worked great for loading a stylesheet with a callback,

  • 0

http://www.phpied.com/when-is-a-stylesheet-really-loaded/

Using this solution has worked great for loading a stylesheet with a callback, except in Chrome.

In Chrome (v18) I can still see the CSS being applied, which screws up some other functions that depend on the height and width settings from the dynamically loaded CSS.

Any ideas???

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T22:19:29+00:00Added an answer on June 1, 2026 at 10:19 pm

    In WebKit, you can poll for changes to document.styleSheets, here is a function that do that in lazyload (taken from https://github.com/rgrove/lazyload/blob/master/lazyload.js)

    Or just use that plugin it does js too 🙂

    function pollWebKit() {
        var css = pending.css, i;
    
        if (css) {
          i = styleSheets.length;
    
          // Look for a stylesheet matching the pending URL.
          while (--i >= 0) {
            if (styleSheets[i].href === css.urls[0]) {
              finish('css');
              break;
            }
          }
    
          pollCount += 1;
    
          if (css) {
            if (pollCount < 200) {
              setTimeout(pollWebKit, 50);
            } else {
              // We've been polling for 10 seconds and nothing's happened, which may
              // indicate that the stylesheet has been removed from the document
              // before it had a chance to load. Stop polling and finish the pending
              // request to prevent blocking further requests.
              finish('css');
            }
          }
        }
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://www.sitepoint.com/build-to-do-list-30-minutes/ So I was doing this (http://www.sitepoint.com/build-to-do-list-30-minutes/) tutorial and everyting went OK. but now
http://www.html5canvastutorials.com/webgl/html5-canvas-webgl-plane-with-three-js/ In this example its just a rotating plane. I'm an html 5 beginner
http://www.chris-wang.com/ If you hover over the textual navigation words on this page, you'll see
http://www.example.com/http://www.test.com I have tried many different methods using .htaccess with no luck. I need
http://www.radikalgenc.com/bulten/ekim.htm this is a monthly newsletter. but it does not appear fine on mozilla,
http://www.codeproject.com/KB/architecture/three_tier_architecture.aspx Does this website give a good example on 3-tier architecture? I thought it
http://www.myserver.com/exile?Key1=Value1&Key2=Value2 When i get a request in this format to my server, how do
http://www.youtube.com/watch?v=gZNdfVwkttM - you can see all of the problem described on this video if
http://www.neilstuff.com/guide_to_cpp/notes/Multi%20Dimension%20Arrays%20and%20Pointer%20Pointers.htm According to this site, I should be able to use the following code:
http://www.microsoft.com/windowsxp/using/accessibility/characterrepeatrate.mspx - There's an option in Windows for setting repeat delay. It means the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.