code: function spyReadsAndWrites(jQuery) {
          var TYPE_SET = 'write',
              TYPE_GET = 'read';
  
          function report(type, funcName, context, args) {
              var caller = phantomas.getCaller(1),
                  contextPath = phantomas.getDOMPath(context);
  
              args = (typeof args !== 'undefined') ? Array.prototype.slice.apply(args) : undefined;
  
              phantomas.emit('jQueryOp', type, funcName, args, contextPath, caller);
          }
  
          // "complex" getters and setters
          [
              'attr',
              'css',
              'prop',
          ].forEach(function(funcName) {
              phantomas.spy(jQuery.fn, funcName, function(propName, val) {
                  // setter when called with two arguments or provided with key/value set
                  var isSet = (typeof val !== 'undefined') || (propName.toString() === '[object Object]');
                  report(isSet ? TYPE_SET : TYPE_GET, funcName, this[0], arguments);
              });
          });
  
          // simple getters and setters
          [
              'height',
              'innerHeight',
              'innerWidth',
              'offset',
              'outerHeight',
              'outerWidth',
              'text',
              'width',
              'scrollLeft',
              'scrollTop'
          ].forEach(function(funcName) {
              phantomas.spy(jQuery.fn, funcName, function(val) {
                  // setter when called with an argument
                  var isSet = (typeof val !== 'undefined');
                  report(isSet ? TYPE_SET : TYPE_GET, funcName, this[0], arguments);
              });
          });
  
          // setters
          [
              'addClass',
              'removeAttr',
              'removeClass',
              'removeProp',
              'toggleClass',
          ].forEach(function(funcName) {
              phantomas.spy(jQuery.fn, funcName, function(val) {
                  report(TYPE_SET, funcName, this[0], [val]);
              });
          });
          // getters
          [
              'hasClass',
              'position',
          ].forEach(function(funcName) {
              phantomas.spy(jQuery.fn, funcName, () => {
                  report(TYPE_GET, funcName, this[0], arguments);
              });
          });
      }
docs: read & write DOM operations (issue #436)