Skip to content
Sails adapter for JSDom
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


JSDom Adapter

This adapter provides an interface to JSDom through the ORM (


Since this isn't released as an npm module, you have to download and put JSDomAdapter.js in your api/adapters directory. If this adapter matures, I'm happy to release on npm.


Create a Page model hooked up to the jsdom adapter:

module.exports = {
	adapter: 'jsdom'

Then you can use it:

	url: ''
}).done(function(err, page) {
	// Page object contains some useful stuff

	// Most relevantly, you can access the window object

About Sails.js and Waterline

Waterline is a new kind of storage and retrieval engine for Sails.js. It provides a uniform API for accessing stuff from different kinds of databases, protocols, and 3rd party APIs. That means you write the same code to get users, whether they live in mySQL, LDAP, MongoDB, or Facebook.

You can’t perform that action at this time.