#4 Domite >> fixAppend

Offen
vor 8 Jahren geöffnet von herby · 0 Kommentare

Originally at 2015-02-20T20:41:23Z by Herbert Vojčík

The "cursor" is based on [parent, reference] pair to use with insertBefore DOM API. That means, if I create copy := aDomite copy and then do aDomite insertXxx: ... then copy would be "moved" as well. This is often ok and DWIW (if I insert something, cursor moves). But sometimes, one wants to fix the cursor at the place to have "after" semantics.

Having "after" and "before" modes is not a way - instead, this could be accomplished by insert a 'beacon' (element with no visual appearance) and setting the reference to that element. So, there should probably be APIs for that - Domite >> fixAppend and probably also Domite class >> newBeacon to allow other magic with beacons.

Originally at 2015-02-20T20:41:23Z by Herbert Vojčík The "cursor" is based on [parent, reference] pair to use with insertBefore DOM API. That means, if I create `copy := aDomite copy` and then do `aDomite insertXxx: ...` then copy would be "moved" as well. This is often ok and DWIW (if I insert something, cursor moves). But sometimes, one wants to fix the cursor at the place to have "after" semantics. Having "after" and "before" modes is not a way - instead, this could be accomplished by insert a 'beacon' (element with no visual appearance) and setting the reference to that element. So, there should probably be APIs for that - Domite >> fixAppend and probably also Domite class >> newBeacon to allow other magic with beacons.
Anmelden, um an der Diskussion teilzunehmen.
Kein Label
Kein Meilenstein
Niemand zuständig
1 Beteiligte
Laden…
Abbrechen
Speichern
Hier gibt es bis jetzt noch keinen Inhalt.