aurelia / aurelia/binding

feature: EventsManager Resolving delegate/capture targetEvents callbacks support navigation control attributes

Open
#559 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
110
Forks
98
PR merge metrics
No merged PRs in 30d

Description

**I'm submitting a feature request**
When resolving delegate/capture target events, the DOM will be transversed until from the current target through its parentNode until target.delegateCallbacks[event.type] is found.

feature: Change the behaviour of the two functions handleDelegatedEvent and handleCaptureEvent
such that they inspect the current target for property potentially call DelCapNav.
If this property is found then it is assumed the node tree under current element is virtual mirror implementation of another node element at the same level, which would contains the actual delegateCallBack events. The new behavior will then go iterate the correct node tree and identify
then delegateCallBack to call.

The DelCapNav Property needs to typically support a few options.
- Top, means iterate list from top the positional count will be eqivalent.
- Bottom, means iterate list from bottom the position count will be equivalent.
- ID=[optionalattribue], their is id or another property that can be used to pair up the list.
- undefined, same as TOP.

This would allow java script to dynamically create summary previews and over-layers for headers and footers in certain controls, with out extensively duplicate lots of HTML, using Aurelia templates
and then having to dynamic hide/show elements.
One could just simple clone a couple of nodes and the event model will still work.
An example could be seen here.

https://jsfiddle.net/wesley_olis/cvfswtm0/1/#&togetherjs=Jvc4rqH8iy

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing handleDelegatedEvent and handleCaptureEvent functions and the behavior demonstrated in the linked JSFiddle. Define how DelCapNav values such as Top, Bottom, ID, and undefined pair mirrored node trees and resolve delegate or capture callbacks, then verify that cloned summary, overlay, header, and footer nodes retain the intended event behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.