#4 Domite >> fixAppend

Open
opened 8 years ago by herby · 0 comments

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.
No Label
No Milestone
No assignee
1 Participants
Loading...
Cancel
Save
There is no content yet.