Intercepting Events/Properties on Renders
See original GitHub issueGoal
Have a way to intercept events/properties on Renderer so that we could do things like:
- Create custom event handlers. ie, touch events, swipe, etc
- Create custom DOM elements / events / properties for things like jQuery/EXT js/ other widget library integration
Simple event integration
<div (ionic-swipe)="...">
Here it we need to be able to register custom ionic-swipe
event.
<jquery-ui type="data-picker" (select)="..." [min-date]='exp"></jquery-ui>
Here we need to know that we need to create a custom element jquery-ui
which is just a div
upgraded with jquery-ui library to a date-picker
. The system then needs to be able to deduce that the jquery-ui has a select
event and a minDate
property on it. These bindings/events are not registered using normal DOM api but using custom API.
Proposal
Have a way to register synthetic elements
, events
, and properties
with the DOMRenderer
Requirements:
- Needs to be done on the UI Thread
- Needs to be fast, as we create a lot of bindings/events/elements
- Needs to be element scoped since different elements will have different events/properties
- Should integrate with schema, so that the compiler can easily throw an typos
- Integration with schema is what will allow us to bridge with web-components
API:
The DOMRenderer
will have additional API for registering “interceptors” per element name. This will allow custom code to be run on element creation, event registration and property updates.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:6
- Comments:9 (8 by maintainers)
@mhevery Is the issue relevant?
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.