#4 Domite >> fixAppend

Mở
%! (template.HTML=8 năm trước cách đây)đang mở bởi herby · 0 ý kiến

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.
Đăng nhập để tham gia bình luận.
Không có nhãn
Không có Milestone
Không có người được phân công
1 tham gia
Đang tải...
Hủy bỏ
Lưu
Ở đây vẫn chưa có nội dung nào.