Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added preventDefault and stopPropagation to events #143

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
=====
:warning: TODO(xooxdoo): move xtag.component to seperate repo if xtag is just a dependancy
=====

# X-Tag - Rocket fuel for component development

[![Bower version](https://badge.fury.io/bo/x-tag-core.svg)](http://badge.fury.io/bo/x-tag-core)
Expand Down
4 changes: 4 additions & 0 deletions src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@
if (!skipProps[z]) writeProperty(z, event, base, desc);
}
event.baseEvent = base;
// https://developer.mozilla.org/en/docs/Web/API/Event/preventDefault
event.preventDefault = base.preventDefault.bind( base );
// https://developer.mozilla.org/en/docs/Web/API/Event/stopPropagation
event.stopPropaggation = base.preventDefault.bind( base );
}

// Accessors
Expand Down
1 change: 1 addition & 0 deletions src/core.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@