This website was designed to display well on any size screen, including (and
On a PC or MAC, you can adjust the width
of your browser window and the page elements will shrink and grow to accommodate. A wider width
will allow a display of two columns. A smaller width will show one column that you can shrink
as small as you wish.
On a smartphone or tablet, experiment with both portrait and landscape orientations
to see which works best for you.
This site looks spectacular on a retina display.
1 Code Snippets
Code snippets are often displayed with collapsible elements. Philosophically,
we include complete code snippets so that you get a complete picture of a working
example. Because complete examples can consume a lot of screen real
estate, we collapse certain sections in order to focus
your attention on what's important.
This approach allows you to browse through the rest
of the example by expanding and collapsing code groups. In addition,
we will often highlight important lines in yellow for the same reason.
1.1 Collapsing/Expanding Code Groups
To open a closed collapsible group, click on either the plus sign or the line number just to the
left of the plus sign.
To close an open collapsible group, click on either the minus sign or any of the line numbers of the group
or anywhere on the grouping indicator line. The intent is to allow for the largest possible hot-spot target on smartphone devices.
1.1.1 Multi-Column Consideration
When using a device with a larger screen (e.g. with a PC browser),
if the window is open wide, you will see two side-by-side columns.
When collapsing or expanding code groups in a code snippet when two columns
the code snippet may jump to another column as it grows or shrinks in size.
Therefore, when interacting with the code collapsing mechanism, it may be best to reduce
the size of the window such that only one column is rendered.
When the width of your screen cannot display all of the code in a code snippet,
you can scroll left and right through the code. (Line numbers do not scroll off the screen.)
Although the horizontal scrollbar is obvious on most browsers, you may not see any visual
indication that it is possible to scroll on a smartphone, but scrolling is enabled. Just
slide your thumb left and right over the code portion of a code snippet assuming that
the code is too wide to be displayed on the device.
1.3 API Links
APIs that appear in code snippets are links to
the corresponding section of the API page. These links are dark blue.
1.4 'Top' Links
Each heading on this website has a "top" link at its far right-hand side.
(The up-arrow inside the circle.) Use this to navigate to the top of the current page
where all navigation is located.
2 Mobile Considerations
In portrait mode on a mobile device, you may notice that some long
words, typically variable or function names, will split across lines. If you
find this objectionable, turn the device to portrait mode.