From 5ccf8cbefdc2ca99e5a6b4c0a616dbe934825ff4 Mon Sep 17 00:00:00 2001 From: Andrew Dupont Date: Wed, 9 Sep 2009 23:18:45 -0500 Subject: [PATCH] Change all H4s in _method_ documentation blocks to H5s. (Start with H5 when using headings in a method doc block; start with H4 when using headings in a namespace/class doc block.) --- src/dom/dom.js | 2 +- src/dom/event.js | 20 ++++++++++---------- src/dom/form.js | 8 ++++---- src/lang/class.js | 2 +- src/lang/string.js | 12 ++++++------ 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/dom/dom.js b/src/dom/dom.js index 5713f03..3fae168 100644 --- a/src/dom/dom.js +++ b/src/dom/dom.js @@ -320,7 +320,7 @@ Element.Methods = { * - `top` (as `element`'s first child) * - `bottom` (as `element`'s last child) * - *

Examples

+ *
Examples
* * Insert the given HTML at the bottom of the element (using the default): * diff --git a/src/dom/event.js b/src/dom/event.js index af7f01d..88cab98 100644 --- a/src/dom/event.js +++ b/src/dom/event.js @@ -418,7 +418,7 @@ * * The examples in this documentation use the [[Element#observe]] form. * - *

The Handler

+ *
The Handler
* * Signature: * @@ -435,13 +435,13 @@ * Note that we used `this` to refer to the element, and that we received the `event` object * as a parameter (even on MSIE). * - *

It's All About Timing

+ *
It's All About Timing
* * One of the most common errors trying to observe events is trying to do it before the element * exists in the DOM. Don't try to observe elements until after the * [[document.observe dom:loaded]] event or `window` `load` event has been fired. * - *

Preventing the Default Event Action and Bubbling

+ *
Preventing the Default Event Action and Bubbling
* * If we want to stop the event (e.g., prevent its default action and stop it bubbling), we can * do so with the extended event object's [[Event#stop]] method: @@ -450,7 +450,7 @@ * event.stop(); * }); * - *

Finding the Element Where the Event Occurred

+ *
Finding the Element Where the Event Occurred
* * Since most events bubble from descendant elements up through the hierarchy until they're * handled, we can observe an event on a container rather than individual elements within the @@ -481,12 +481,12 @@ * record was clicked. [[Event#findElement]] finds the row that was clicked, and `this` refers * to the table we were observing. * - *

Stopping Observing the Event

+ *
Stopping Observing the Event
* * If we don't need to observe the event anymore, we can stop observing it with * [[Event.stopObserving]] (aka [[Element#stopObserving]]). * - *

Using an Instance Method as a Handler

+ *
Using an Instance Method as a Handler
* * If we want to use an instance method as a handler, we will probably want to use * [[Function#bind]] to set the handler's context; otherwise, the context will be lost and @@ -511,13 +511,13 @@ * details. There's also [[Function#bindAsEventListener]], which is handy for certain very * specific situations. (Normally, `bind` is all you need.) * - *

Side Notes

+ *
Side Notes
* * Although Prototype smooths out most of the differences between browsers, the fundamental * behavior of a browser implementation isn't changed. For example, the timing of the `change` * or `blur` events varies a bit from browser to browser. * - *

Changes in 1.6.x

+ *
Changes in 1.6.x
* * Prior to Prototype 1.6, `observe` supported a fourth argument (`useCapture`), a boolean that * indicated whether to use the browser's capturing phase or its bubbling phase. Since MSIE does @@ -572,7 +572,7 @@ * for that `eventName`. If `eventName` is also omitted, unregisters _all_ * event handlers on `element`. (In each case, only affects handlers registered via Prototype.) * - *

Examples

+ *
Examples
* * Assuming: * @@ -591,7 +591,7 @@ * * $('foo').stopObserving(); * - *

A Common Error

+ *
A Common Error
* * When using instance methods as observers, it's common to use [[Function#bind]] on them, e.g.: * diff --git a/src/dom/form.js b/src/dom/form.js index 37f4b13..2c374e1 100644 --- a/src/dom/form.js +++ b/src/dom/form.js @@ -39,14 +39,14 @@ var Form = { * the value for that key in the object will be an array of the field values * in the order they appeared on the array of elements. * - *

The Options

+ *
The Options
* * The options allow you to control two things: What kind of return * value you get (an object or a string), and whether and which `submit` * fields are included in that object or string. * * If you do not supply an `options` object _at all_, the options - * `{hash: false}` are used. + * `{ hash: false }` are used. * * If you supply an `options` object, it may have the following options: * - `hash` ([[Boolean]]): `true` to return a plain object with keys and values @@ -64,7 +64,7 @@ var Form = { * _(Deprecated)_ If you pass in a [[Boolean]] instead of an object for `options`, it * is used as the `hash` option and all other options are defaulted. * - *

A hash, not a Hash

+ *
A hash, not a Hash
* * If you opt to receive an object, it is a plain JavaScript object with keys * and values, __not__ a [[Hash]]. All JavaScript objects are hashes in the lower-case @@ -629,7 +629,7 @@ Form.Element.EventObserver = Class.create(Abstract.EventObserver, { }); /** section: DOM - * class Form.Element.EventObserver < Abstract.EventObserver + * class Form.EventObserver < Abstract.EventObserver **/ Form.EventObserver = Class.create(Abstract.EventObserver, { getValue: function() { diff --git a/src/lang/class.js b/src/lang/class.js index bbf6eac..68b1fe6 100644 --- a/src/lang/class.js +++ b/src/lang/class.js @@ -86,7 +86,7 @@ var Class = (function() { * of the class and of all its subclasses, even those that have already been * instantiated. * - *

Examples

+ *
Examples
* * var Animal = Class.create({ * initialize: function(name, sound) { diff --git a/src/lang/string.js b/src/lang/string.js index 09fd464..c0c7012 100644 --- a/src/lang/string.js +++ b/src/lang/string.js @@ -127,11 +127,11 @@ Object.extend(String.prototype, (function() { * `span`, and `abbr`. It _will not_ strip namespace-prefixed tags such * as `h:table` or `xsl:template`. * - *

Caveat User

+ *
Caveat User
* * Note that the processing `stripTags` does is good enough for most purposes, but * you cannot rely on it for security purposes. If you're processing end-user-supplied - * content, `stripTags` is probably _not_ sufficiently robust to ensure that the content + * content, `stripTags` is _not_ sufficiently robust to ensure that the content * is completely devoid of HTML tags in the case of a user intentionally trying to circumvent * tag restrictions. But then, you'll be running them through [[String#escapeHTML]] anyway, * won't you? @@ -145,12 +145,12 @@ Object.extend(String.prototype, (function() { * * Strips a string of things that look like an HTML script blocks. * - *

Example

+ *
Example
* * "

This is a test.End of test

".stripScripts(); * // => "

This is a test.End of test

" * - *

Caveat User

+ *
Caveat User
* * Note that the processing `stripScripts` does is good enough for most purposes, * but you cannot rely on it for security purposes. If you're processing end-user-supplied @@ -183,7 +183,7 @@ Object.extend(String.prototype, (function() { * they were empty (the result for that position in the array will be `undefined`); * external files are _not_ loaded and processed by `evalScripts`. * - *

About `evalScripts`, `var`s, and defining functions

+ *
About `evalScripts`, `var`s, and defining functions
* * `evalScripts` evaluates script blocks, but this **does not** mean they are * evaluated in the global scope. They aren't, they're evaluated in the scope of @@ -302,7 +302,7 @@ Object.extend(String.prototype, (function() { * Converts a string separated by dashes into a camelCase equivalent. * For instance, 'foo-bar' would be converted to 'fooBar'. * - *

Examples

+ *
Examples
* * 'background-color'.camelize(); * // -> 'backgroundColor'