Comments (1)
I have just fixed the above issue. PFB the code changes that would actually fix yslow. (I picked up the fix from stackoverflow and updated the yslow code with the fix).
require('fs').readFile('XXX.har', function (err, data) {
var har = JSON.parse(data);
var YSLOW = require('yslow').YSLOW;
var jsdom = require('jsdom');
const { JSDOM } = jsdom;
const { document } = (new JSDOM('')).window;
global.document = document;
var res = YSLOW.harImporter.run(document, har, 'ydefault');
var content = YSLOW.util.getResults(res.context, 'basic');
console.log(content);
});
from yslow.
Related Issues (20)
- TypeError: undefined is not an object (evaluating 'args.length') yslow.js:5 in global code HOT 1
- Cannot delete YSlow bookmark
- Extracting Yslow results?
- Active fork replacement for this project?
- Can't invoke YSlow on Safari? Curious why.
- Curious on supported browsers for javascript based bookmark method
- Test run is not complete
- Permission denied when make pkg HOT 1
- Data fluctuating everytime
- YSlow not working on Chrome Version 67.x HOT 5
- Where has YSlow gone in Chrome? HOT 4
- FontAwesome Pro CDN not recognised
- Invalid manifest HOT 4
- yslow-3.1.8 fails silently + hangs forever HOT 1
- Download links for firefox and chrome return 404 Page not found HOT 8
- phantomjs://code/yslow.js:5 in global code HOT 1
- Request not found in server HOT 1
- Google Chrome extension no longer available HOT 1
- The bookmarklet doesn't work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yslow.