#4 Domite >> fixAppend

Aperto
aperto 8 anni fa da herby · 0 commenti
Herby Vojčík ha commentato 8 anni fa

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.
Sign in to join this conversation.
Nessuna etichetta
Nessuna milestone
Nessun assegnatario
1 Partecipanti
Caricamento...
Annulla
Salva
Non ci sono ancora contenuti.