#4 Domite >> fixAppend

Otwarty
otworzone 8 lat temu przez herby · 0 komentarzy
Herby Vojčík skomentował 8 lat temu

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.
Zaloguj się, aby dołączyć do tej rozmowy.
Brak etykiety
Brak kamienia milowego
Brak przypisania
1 uczestników
Ładowanie...
Anuluj
Zapisz
Nie ma jeszcze treści.