Skip to content

Would it be possible to add Native Event Handlers #279

@shawty

Description

@shawty

At the request of @liminzhu on issue #253 I'm opening this as a new issue so it can be more easily tracked.

Following the recent discussion on the issue mentioned above, a number of users (Myself included) have come to the conclusion that adding a native pass through to the C# side of things for common JavaScript events would be a good idea.

Primarily the request was asked about passing through either the "DOMContentReady" or "load" event handlers so that there was a notification on the C# side when either of these 2 JavaScript events where raised.

As the discussion progressed however, it became apparent that a universal event system would be more beneficial.

There are some common events such as the load events, and possibly click, blur and focus events that should have ready made interception points, but in general something like a 'RaiseEvent("eventName", new { ... event data ... })' in C#, along with a corresponding "onEventRaised(sender, string eventName, new { ... event data ...})" would help with linking up C# code to JS code.

In my Custom browser (https://github.com/shawty/hbbtvbrowserEXPERIMENTAL) I've more or less done that myself using the existing message passing features, so I don't think it would be too difficult for a permanent JavaScript stub to be added to the existing code in the control that performed a similar task and surfaced these events in an easier to digest way.

AB#27010334

Metadata

Metadata

Labels

feature requestfeature requestpriority-lowWe have considered this issue and decided that we will not be able to address it in the near future.trackedWe are tracking this work internally.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions