Browse Source

More up to date class doc.

Herby Vojčík 4 years ago
parent
commit
e42664cb65
2 changed files with 8 additions and 10 deletions
  1. 2 2
      src/Web.js
  2. 6 8
      src/Web.st

+ 2 - 2
src/Web.js

@@ -2739,7 +2739,7 @@ $globals.HTMLCanvas);
 
 $core.addClass("TagBrush", $globals.Object, ["canvas", "element"], "Web");
 //>>excludeStart("ide", pragmas.excludeIdeData);
-$globals.TagBrush.comment="I am a brush for building a single DOM element (which I hold onto).\x0a\x0aAll tags but `<style>` are instances of me (see the `StyleBrush` class).\x0a\x0a## API\x0a\x0a1. Nesting\x0a\x0a    Use `#with:` to nest tags. `#with:` can take aString, `TagBrush` instance, a `Widget` or block closure as parameter.\x0a\x0a    Example: `aTag with: aString with: aCanvas div`\x0a\x0a2. Events\x0a\x0a    The `events` protocol contains all methods related to events (delegating event handling to jQuery).\x0a\x0a    Example: `aTag onClick: [ window alert: 'clicked' ]`\x0a\x0a3. Attributes\x0a\x0a    The `attribute` protocol contains methods for attribute manipulation (delegating to jQuery too).\x0a\x0a    Example: `aTag at: 'value' put: 'hello world'`\x0a\x0a4. Raw access and jQuery\x0a\x0a    The `#element` method can be used to access to JavaScript DOM element object.\x0a\x0a    Example: `aTag element cssStyle`\x0a\x0a    Use `#asJQuery` to access to the receiver converted into a jQuery object.\x0a\x0a    Example: `aTag asJQuery css: 'color' value: 'red'`";
+$globals.TagBrush.comment="I am a brush for building a single DOM element (which I hold onto).\x0a\x0a## API\x0a\x0a1. Nesting\x0a\x0a    Use `#with:` to nest tags. `#with:` can take aString, `TagBrush` instance, a `Widget` or block closure as parameter.\x0a\x0a    Example: `aTag with: aString with: aCanvas div`\x0a\x0a2. Events\x0a\x0a    The `events` protocol contains all methods related to events (delegating event handling to jQuery).\x0a\x0a    Example: `aTag onClick: [ window alert: 'clicked' ]`\x0a\x0a3. Attributes\x0a\x0a    The `attribute` protocol contains methods for attribute manipulation.\x0a\x0a    Example: `aTag at: 'value' put: 'hello world'`\x0a\x0a4. Raw access and jQuery\x0a\x0a    The `#asDomNode` method can be used to access to JavaScript DOM element object.\x0a\x0a    Example: `aTag asDomNode cssStyle`\x0a\x0a    Use `#asJQuery` to access to the receiver converted into a jQuery object.\x0a\x0a    Example: `aTag asJQuery css: 'color' value: 'red'`";
 //>>excludeEnd("ide");
 $core.addMethod(
 $core.method({
@@ -4547,7 +4547,7 @@ $globals.TagBrush.a$cls);
 
 $core.addClass("Widget", $globals.Object, [], "Web");
 //>>excludeStart("ide", pragmas.excludeIdeData);
-$globals.Widget.comment="I am a presenter building HTML. Subclasses are typically reusable components.\x0a\x0a## API\x0a\x0aUse `#renderContentOn:` to build HTML. (See `HTMLCanvas` and `TagBrush` classes for more about building HTML).\x0a\x0aTo add a widget to the page, the convenience method `#appendToJQuery:` is very useful.\x0a\x0aExemple: \x0a\x0a    Counter new appendToJQuery: 'body' asJQuery";
+$globals.Widget.comment="I am a presenter building HTML. Subclasses are typically reusable components.\x0a\x0a## API\x0a\x0aUse `#renderOn:` to build HTML. (See `HTMLCanvas` and `TagBrush` classes for more about building HTML).\x0a\x0aTo add a widget to the page, the convenience method `#appendToBrush:` is very useful.\x0a\x0aExemple: \x0a\x0a    Counter new appendToBrush: 'body' asBrush";
 //>>excludeEnd("ide");
 $core.addMethod(
 $core.method({

+ 6 - 8
src/Web.st

@@ -492,8 +492,6 @@ Object subclass: #TagBrush
 !TagBrush commentStamp!
 I am a brush for building a single DOM element (which I hold onto).
 
-All tags but `<style>` are instances of me (see the `StyleBrush` class).
-
 ## API
 
 1. Nesting
@@ -510,15 +508,15 @@ All tags but `<style>` are instances of me (see the `StyleBrush` class).
 
 3. Attributes
 
-    The `attribute` protocol contains methods for attribute manipulation (delegating to jQuery too).
+    The `attribute` protocol contains methods for attribute manipulation.
 
     Example: `aTag at: 'value' put: 'hello world'`
 
 4. Raw access and jQuery
 
-    The `#element` method can be used to access to JavaScript DOM element object.
+    The `#asDomNode` method can be used to access to JavaScript DOM element object.
 
-    Example: `aTag element cssStyle`
+    Example: `aTag asDomNode cssStyle`
 
     Use `#asJQuery` to access to the receiver converted into a jQuery object.
 
@@ -846,13 +844,13 @@ I am a presenter building HTML. Subclasses are typically reusable components.
 
 ## API
 
-Use `#renderContentOn:` to build HTML. (See `HTMLCanvas` and `TagBrush` classes for more about building HTML).
+Use `#renderOn:` to build HTML. (See `HTMLCanvas` and `TagBrush` classes for more about building HTML).
 
-To add a widget to the page, the convenience method `#appendToJQuery:` is very useful.
+To add a widget to the page, the convenience method `#appendToBrush:` is very useful.
 
 Exemple: 
 
-    Counter new appendToJQuery: 'body' asJQuery!
+    Counter new appendToBrush: 'body' asBrush!
 
 !Widget methodsFor: 'adding'!