Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jQuery 1.7 - Cannot set property cssText #29

Closed
braddunbar opened this issue Nov 9, 2011 · 1 comment
Closed

jQuery 1.7 - Cannot set property cssText #29

braddunbar opened this issue Nov 9, 2011 · 1 comment

Comments

@braddunbar
Copy link

cross posted from jsdom issue: jsdom/jsdom#356

Using the following, I am receiving an error using jQuery 1.7:

test.html

<!doctype html>
<html>
<head>
  <script src='http://code.jquery.com/jquery-1.7.js'></script>
</head>
<body>
</body>
</html>

test.js

#!/usr/bin/env node

var fs = require('fs');
var jsdom = require('jsdom').jsdom;

var window = jsdom(fs.readFileSync('test.html')).createWindow();

window.onload = function(){
  console.log('loaded');
};

The error I receive is:

TypeError: Cannot set property cssText of [object Object] which has only a getter
    at Object.<anonymous> (http://code.jquery.com/jquery-1.7.js:1621:27)
    at Object.<anonymous> (http://code.jquery.com/jquery-1.7.js:1064:30)
    at Object.fireWith (http://code.jquery.com/jquery-1.7.js:1182:7)
    at Function.ready (http://code.jquery.com/jquery-1.7.js:437:14)
    at Object.<anonymous> (http://code.jquery.com/jquery-1.7.js:927:10)
    at Function.dispatch (/Users/brad/dev/test/node_modules/jsdom/lib/jsdom/level2/events.js:195:42)
    at Object.dispatchEvent (/Users/brad/dev/test/node_modules/jsdom/lib/jsdom/level2/events.js:285:33)
    at Object.<anonymous> (/Users/brad/dev/test/node_modules/jsdom/lib/jsdom/level2/html.js:391:12)
    at /Users/brad/dev/test/node_modules/jsdom/lib/jsdom/level2/html.js:48:20
    at Object.check (/Users/brad/dev/test/node_modules/jsdom/lib/jsdom/level2/html.js:277:11)

I think this is because CSSOM doesn't define a setter for cssText.

@paulmillr
Copy link

@NV ping ping ping. this is a blocker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants