|
Last change
on this file was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago |
|
Prototype 1.1
|
-
Property mode
set to
100644
|
|
File size:
509 bytes
|
| Line | |
|---|
| 1 | export default function(onenter, onupdate, onexit) {
|
|---|
| 2 | var enter = this.enter(), update = this, exit = this.exit();
|
|---|
| 3 | if (typeof onenter === "function") {
|
|---|
| 4 | enter = onenter(enter);
|
|---|
| 5 | if (enter) enter = enter.selection();
|
|---|
| 6 | } else {
|
|---|
| 7 | enter = enter.append(onenter + "");
|
|---|
| 8 | }
|
|---|
| 9 | if (onupdate != null) {
|
|---|
| 10 | update = onupdate(update);
|
|---|
| 11 | if (update) update = update.selection();
|
|---|
| 12 | }
|
|---|
| 13 | if (onexit == null) exit.remove(); else onexit(exit);
|
|---|
| 14 | return enter && update ? enter.merge(update).order() : update;
|
|---|
| 15 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.