Created
June 21, 2018 09:10
-
-
Save mmintel/6b93d90353269b95e4ff7197beb20500 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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