Skip to content

Instantly share code, notes, and snippets.

@mmintel
Created June 21, 2018 09:10
Show Gist options
  • Save mmintel/6b93d90353269b95e4ff7197beb20500 to your computer and use it in GitHub Desktop.
Save mmintel/6b93d90353269b95e4ff7197beb20500 to your computer and use it in GitHub Desktop.
import View from './view';
import Model from './model';
import Controller from './controller';
export default class Clipboard {
constructor(options) {
this.model = new Model();
this.controller = new Controller(this.model);
this.view = new View(this.controller, options);
}
copy() {
this.controller.copy();
}
clear() {
this.controller.clear();
}
onCopy(cb) {
this.controller.onCopy = cb;
}
onClear(cb) {
this.controller.onClear = cb;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment