Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 84ac558

Browse files
codymikolmmalerba
authored andcommitted
chore(tests):remove unused phantomJS workaround (#11659)
this is no longer necessary as phantomJS is not used anymore Relates to #11489
1 parent 08bc72e commit 84ac558

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

test/angular-material-spec.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,6 @@
77
*/
88
(function() {
99

10-
11-
// Patch since PhantomJS does not implement click() on HTMLElement. In some
12-
// cases we need to execute the native click on an element. However, jQuery's
13-
// $.fn.click() does not dispatch to the native function on <a> elements, so we
14-
// can't use it in our implementations: $el[0].click() to correctly dispatch.
15-
// Borrowed from https://stackoverflow.com/questions/15739263/phantomjs-click-an-element
16-
if (!HTMLElement.prototype.click) {
17-
HTMLElement.prototype.click = function() {
18-
var ev = document.createEvent('MouseEvent');
19-
ev.initMouseEvent(
20-
'click',
21-
/*bubble*/true, /*cancelable*/true,
22-
window, null,
23-
0, 0, 0, 0, /*coordinates*/
24-
false, false, false, false, /*modifier keys*/
25-
0/*button=left*/, null
26-
);
27-
this.dispatchEvent(ev);
28-
};
29-
}
30-
3110
var enableAnimations;
3211

3312
beforeAll(function () {

0 commit comments

Comments
 (0)