blob: f4d967f598963b0dc25df2a6fe38ae63f675eae2 [file] [log] [blame]
/*
* Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
*/
/**
* @assertion EventTarget get currentTarget
* A reference to the currently registered target for the event.
* @description Checks expected attribute values.
*/
import "dart:html";
import "../../../Utils/expect.dart";
import "../../../Utils/async_utils.dart";
main() {
var body = document.body;
var div = new DivElement();
body.append(div);
body.onClick.listen((e) {
Expect.identical(body, e.currentTarget);
asyncEnd();
});
div.onClick.listen((e) {
Expect.identical(div, e.currentTarget);
asyncEnd();
});
asyncMultiStart(2);
div.dispatchEvent(new Event('click'));
}