Version 1.3 glow
API Quick Reference
JavaScript is required to use the quick reference
The glow namespace and core library.
Includes common methods for running scripts onDomReady and user agent sniffing.
Properties
- env
Information about the browser / platform
- Type
- Object
Properties
gecko- Gecko version number to one decimal place (eg 1.9) or NaN
ie- IE version number or NaN
khtml- KHTML version number to one decimal place or NaN
opera- Opera version (eg 8.02) or NaN
standardsMode- True if the browser reports itself to be in 'standards mode'
version- Browser version as a string. Includes non-numerical data, eg "1.8.1" or "7b"
webkit- Webkit version number to one decimal place (eg 419.3) or NaN
Example
if (glow.env.ie < 7) { //this only runs in IE 6 and below } if (glow.env.gecko < 1.9) { //this only runs in Gecko versions less than 1.9 //Wikipedia can be used to link engine versions to browser versions }- isReady
Is the DOM ready?
- Type
- Boolean
Description
Set to true when the DOM is ready. If the library is included after the DOM is loaded, you should manually set this to true.
- isSupported
Set to true in supported user agents
- Type
- Boolean
Description
This will read false in 'level 2' browsers in BBC's Browser Support Guidelines
Further Info & Examples
- VERSION
Version of glow
Methods
- onDomReady
Calls a function when/if the DOM is ready.
Synopsis
glow.onDomReady(callback);Parameters
- callback
- Type
- Function
Function to call
Returns
Description
Same as glow.ready but ignores glow.isSupported.
- ready
Calls a function when/if the DOM is ready & the browser is supported
Namespaces
- anim
Simple and powerful animations.
- data
Serialising and de-serialising data
- dom
Accessing and manipulating the DOM
- dragdrop
Simplifying drag and drop behaviour
- embed
Detect and embed Flash objects
- events
Native browser and custom events
- forms
Validating HTML Forms
- lang
Useful language functions.
- net
Sending data to & from the server
- tweens
Functions for modifying animations
- widgets
Widget core module.