Parcourir la source

Event API in class doc

Herbert Vojčík il y a 9 ans
Parent
commit
fc73cfdec5
2 fichiers modifiés avec 8 ajouts et 1 suppressions
  1. 0 0
      src/DOMite.js
  2. 8 1
      src/DOMite.st

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
src/DOMite.js


+ 8 - 1
src/DOMite.st

@@ -54,7 +54,14 @@ It is not presumed one would use `setToXxx`
 to actually move around in a single instance.
 It is envisioned this API will be used mostly
 in combination with `copy`, like
-`afterMe := self copy setToAfter`.!
+`afterMe := self copy setToAfter`.
+
+Event API:
+
+ - `aDomite on: aString bind: [ :ev | ... ]` binds a block to process an event.
+ - `aDomite off: aString unbind: aBlock` unbinds the block from processing an event.
+ - `aDomite fire: aString [detail: anObject]` triggers a CustomEvent with specified type and, optionally, a detail object.
+ - `aDomite fireEvent: anEvent` triggers existing DOM Event object!
 
 !Domite methodsFor: 'accessing'!
 

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff