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 6774367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:46:43+00:00 2026-05-26T15:46:43+00:00

so if there is an external css file like: <link rel=’stylesheet’ type=’text/css’ href=’test.css’> and

  • 0

so if there is an external css file like:

<link rel='stylesheet' type='text/css' href='test.css'>  

and we want to read the syle sheet using javascript, we can do it like:

document.styleSheets[0].cssRules[0].cssText; (for example for first rule)

It works fine in firefox, but the same statement give’s error in chrome, with something like Type Error: "non_object_property_load".

What could be the problem and how can we read style sheet in chrome?

Please have a look at the issue i am facing:

http://s4.postimage.org/x5q0xt1vh/file.png  

EDIT: So the problem comes when the test file and linked css are placed locally on the system and are not access through webserver.

  • 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-05-26T15:46:44+00:00Added an answer on May 26, 2026 at 3:46 pm

    Ok I found the problem. It was indeed security related, which works if the external css is in the same directory for firefox but does not work for chrome.
    If css file is in another directory or online, it will not work in firefox as well.

    Now to solve this problem, i started chrome with arguments --allow-file-access-from-files and now it is working perfectly fine as it should.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to load external CSS files, like we load JS file
I added an external stylesheet file (css) to my flex project. Is there a
Is there a way to read off from an [external] xml (an xml file
Is there a command via css/javascript/jquery that shuts off external css(css included through <link
Is there a good external merge tool for tortoisesvn (I don't particularly like the
I am adding an external CSS file and an external JS file to my
I'm trying to dynamically add a css stylesheet rule using javascript, something like example
I am currently using the following as my external print.css file: /* Remove unwanted
I have the following style in an external CSS file called first.css table {
I prefer the use of external css and javascript files. There are however many

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.