Skip to content
Dethe Elza edited this page Jan 16, 2015 · 44 revisions

OUTDATED: This page needs to be updated and does not reflect the current state of Waterbear.


WikiAPI Reference

This is the implementation of Waterbear. It pulls the libraries and the plugins together, implements the IDE and script writing, etc.

Waterbear Scripts

  • ajax.get() - Loads data from the server using a HTTP GET request.
  • ajax.gets() - Loads data from the server using a HTTP GET request and returns the response.
  • ajax.post() - Loads data from the server using a HTTP POST request.
  • ajax.send() - Perform an asynchronous HTTP (Ajax) request.
  • ajax.serialize() - Encodes a set of form elements as a string for submission.
  • ajax.submit() - Submits a form using a HTTP POST request and replaces the content of an element with the response.
  • ajax.update() - Loads data from the server using a HTTP GET request and replaces the content of the element with the data.
  • ajax.x() - Returns a browser-dependent Ajax object.
  • Event.off() - Removes an event handler.
  • Event.on() - Attaches an event handler function for one or more events to the selected elements.
  • Event.once() - Registers an event handler on the event target and removes it immediately after the event is fired.
  • Event.trigger() - Executes all handlers and behaviors attached to the matched elements for the given event type.
  • wb.toggleState - A read-only object containing the toggle state of the toggleable items.
  • wb.menu - A HTML element representing the menu.
  • wb.populateMenu() - Initializes the menu with the default localization data.
  • wb.l10nHalfDone - A boolean value representing whether the system has finished initializing localization data.
  • wb.area() - Returns the area of an element.
  • wb.closest() - Finds the nearest parent, or self, which matches selector.
  • wb.containedBy() - Returns true if the rect of target is at least 90% contained by the rect of container
  • wb.dist() - Returns the distance between two points using Pythagorean theorem.
  • wb.elem() - Utility for dynamically creating DOM elements and structures.
  • wb.find() - Returns the first descendant that matches selector.
  • wb.findAll() - Returns a (true) array of all descendants that match selector.
  • wb.findChildren() - Finds all direct children which match selector as an array.
  • wb.findChild() - Finds the first child which matches selector.
  • wb.hide() - Hides an element.
  • wb.indexOf() - Returns the index of this element in a list of its parent's children.
  • wb.makeArray() - Turns an array-like into a true array.
  • wb.matches() - Returns true if the element matches selector.
  • wb.overlap() - Returns the area of overlap between two elements.
  • wb.overlapRect() - Returns the area of overlap between two rects.
  • wb.reposition() - Moves an absolutely positioned element.
  • wb.show() - Shows a hidden element.
  • wb.rect() - Utility for calling elem.getBoundingClientRect().
  • wb.resize() - Resizes a text input based on the length of its content.
  • isUuid() - Tests if the given value has a UUID format.
  • uuid() - Returns a universally unique identifier as a string.

Clone this wiki locally