Skip to content

Instantly share code, notes, and snippets.

View johnny-b-good's full-sized avatar

Anton Melnikov johnny-b-good

  • Russia, Moscow
View GitHub Profile
.no-scroll {
overflow-x: scroll;
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none; /* IE 10+ */
}
.no-scroll::-webkit-scrollbar { /* WebKit */
width: 0;
height: 0;
}
@johnny-b-good
johnny-b-good / EventBus.js
Created February 1, 2019 08:53
Simple JS event bus
function EventBus(props) {
this.bus = document.createElement('fakeelement');
this.addEventListener = function(event, callback) {
this.bus.addEventListener(event, callback);
};
this.removeEventListener = function(event, callback) {
this.bus.removeEventListener(event, callback);
};