Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: sky/specs/events.md

Issue 884713009: Specs: dartification of dom.md, more work on script.md; this is highly work-in-progress and hasn't … (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/specs/dom.md ('k') | sky/specs/gestures.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/specs/events.md
diff --git a/sky/specs/events.md b/sky/specs/events.md
index b944b792848e323faa41f4c26fa4f32659f276bf..d839c17059f205b963badcd5d981036cc334aa76 100644
--- a/sky/specs/events.md
+++ b/sky/specs/events.md
@@ -29,12 +29,12 @@ abstract class Event<ReturnType> {
}
class EventTarget {
- EventTarget() : _eventsController = new DispatcherController<Event>();
+ EventTarget() : _eventsController = new DispatcherController<@nonnull Event>();
Dispatcher get events => _eventsController.dispatcher;
EventTarget parentNode;
- List<EventTarget> getEventDispatchChain() {
+ List<@nonnull EventTarget> getEventDispatchChain() {
if (this.parentNode == null) {
return [this];
} else {
@@ -46,7 +46,7 @@ class EventTarget {
final DispatcherController _eventsController;
- dynamic dispatchEvent(Event event, { defaultResult: null }) { // O(N*M) where N is the length of the chain and M is the average number of listeners per link in the chain
+ dynamic dispatchEvent(@nonnull Event event, { dynamic defaultResult: null }) { // O(N*M) where N is the length of the chain and M is the average number of listeners per link in the chain
// note: this will throw an ExceptionListException<ExceptionListException> if any of the listeners threw
assert(event != null); // event must be non-null
event.handled = false;
@@ -71,7 +71,7 @@ class EventTarget {
return event.result;
}
- void _dispatchEventLocally(Event event) {
+ void _dispatchEventLocally(@nonnull Event event) {
event._currentTarget = this;
_eventsController.add(event);
}
« no previous file with comments | « sky/specs/dom.md ('k') | sky/specs/gestures.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698