question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Intercepting Events/Properties on Renders

See original GitHub issue

Goal

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:closed
  • Created 8 years ago
  • Reactions:6
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
splincodecommented, Jul 26, 2018

@mhevery Is the issue relevant?

0reactions
angular-automatic-lock-bot[bot]commented, Mar 4, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trigger events from render Backbone.View method
View block is rendering from initialize() method. If i call directly block.trigger('render') , listenTo will work.
Read more >
Top 10 ways to use Interceptors in Angular - Medium
My ten favorite ways to use the interceptor in Angular. With examples of error handling, profiling, caching and more this list will inspire...
Read more >
Component Events - Apache Tapestry
Component events are Tapestry's way of conveying a user's interactions with the web page, such as clicking links and submitting forms, to designated...
Read more >
Analytics - Getting started with Smartlook
Event properties will effectively use only flat objects. In case an object that includes objects or arrays as a child elements is used,...
Read more >
React.Component
These methods are called when there is an error during rendering, in a lifecycle method, or in the constructor of any child component....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found