code: function (options) {
              if (!isObject(options)) {
                  return this.setOptions('restrict', options);
              }
  
              var actions = ['drag', 'resize', 'gesture'],
                  ret;
  
              for (var i = 0; i < actions.length; i++) {
                  var action = actions[i];
  
                  if (action in options) {
                      var perAction = extend({
                              actions: [action],
                              restriction: options[action]
                          }, options);
  
                      ret = this.setOptions('restrict', perAction);
                  }
              }
  
              return ret;
          }
docs: /*\
  Interactable.restrict
  [ method ]
  *
  Deprecated. Add a `restrict` property to the options object passed to
  @Interactable.draggable, @Interactable.resizable or @Interactable.gesturable instead.
  
  Returns or sets the rectangles within which actions on this
  interactable (after snap calculations) are restricted. By default,
  restricting is relative to the pointer coordinates. You can change
  this by setting the
  [`elementRect`](https://github.com/taye/interact.js/pull/72).
  *
  - options (object) #optional an object with keys drag, resize, and/or gesture whose values are rects, Elements, CSS selectors, or 'parent' or 'self'
  = (object) The current restrictions object or this Interactable
  *
  | interact(element).restrict({
  |     // the rect will be `interact.getElementRect(element.parentNode)`
  |     drag: element.parentNode,
  |
  |     // x and y are relative to the the interactable's origin
  |     resize: { x: 100, y: 100, width: 200, height: 200 }
  | })
  |
  | interact('.draggable').restrict({
  |     // the rect will be the selected element's parent
  |     drag: 'parent',
  |
  |     // do not restrict during normal movement.
  |     // Instead, trigger only one restricted move event
  |     // immediately before the end event.
  |     endOnly: true,
  |
  |     // https://github.com/taye/interact.js/pull/72#issue-41813493
  |     elementRect: { top: 0, left: 0, bottom: 1, right: 1 }
  | });
  \