drab v0.4.1 API Reference

Modules

Drab allows to query and manipulate the User Interface directly from the Phoenix server backend

Browser related functions

Enable Drab on the browser side. Must be included in HTML template, for example in web/templates/layout/app.html.eex

Drab Commander is a module to keep event handlers

Drab configuration related functions

Turns on the Drab Commander on the pages generated by this controller

Drab Module with the basic communication from Server to the Browser. Does not require any libraries like jQuery, works on pure Phoenix

Depreciated. To enable Drab, use Drab.Socket in your UserSocket module

Drab Module which contains function to launch Bootstrap Modals in the browser

Drab module which provides interface to DOM objects on the server side. You may query (select/2) or manipulate (update/2, insert/2, delete/2, execute/2) the selected DOM object

Drab operates on websockets. To enable it, you should inject the Drab.Channel into your Socket module (by default it is UserSocket in web/channels/user_socket.ex)

Enables Drab Waiter functionality - synchronous wait for browser events in the Commander handler function

Module with named helpers generated from DrabTestApp.Router

Generates a Drab commander

Exceptions

Raised when the browser encounters a JS error or the timeout for the current operation