mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
ClipboardJS: Removed PhantomJS Dependency
Added karma-chrome-launcher dependency Signed-off-by: ossdev <ossdev@puresoftware.com>
This commit is contained in:
parent
ce79f170aa
commit
83824fa248
@ -2,14 +2,13 @@ var webpackConfig = require('./webpack.config.js');
|
||||
|
||||
module.exports = function (karma) {
|
||||
karma.set({
|
||||
plugins: ['karma-webpack', 'karma-chai', 'karma-sinon', 'karma-mocha', 'karma-phantomjs-launcher'],
|
||||
plugins: ['karma-webpack', 'karma-chai', 'karma-sinon', 'karma-mocha', 'karma-chrome-launcher'],
|
||||
|
||||
frameworks: ['chai', 'sinon', 'mocha'],
|
||||
|
||||
files: [
|
||||
'src/**/*.js',
|
||||
'test/**/*.js',
|
||||
'./node_modules/phantomjs-polyfill/bind-polyfill.js'
|
||||
],
|
||||
|
||||
preprocessors: {
|
||||
@ -26,6 +25,6 @@ module.exports = function (karma) {
|
||||
stats: 'errors-only'
|
||||
},
|
||||
|
||||
browsers: ['PhantomJS']
|
||||
browsers: ['ChromeHeadless']
|
||||
});
|
||||
};
|
||||
|
3172
package-lock.json
generated
3172
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -24,11 +24,10 @@
|
||||
"karma": "^3.1.1",
|
||||
"karma-chai": "^0.1.0",
|
||||
"karma-mocha": "^1.2.0",
|
||||
"karma-phantomjs-launcher": "^1.0.0",
|
||||
"karma-chrome-launcher": "^2.2.0",
|
||||
"karma-sinon": "^1.0.4",
|
||||
"karma-webpack": "^3.0.5",
|
||||
"mocha": "^5.2.0",
|
||||
"phantomjs-prebuilt": "^2.1.4",
|
||||
"sinon": "^7.1.1",
|
||||
"uglifyjs-webpack-plugin": "^2.0.1",
|
||||
"webpack": "^4.5.0",
|
||||
|
@ -137,7 +137,7 @@ class ClipboardAction {
|
||||
if (this.trigger) {
|
||||
this.trigger.focus();
|
||||
}
|
||||
|
||||
document.activeElement.blur();
|
||||
window.getSelection().removeAllRanges();
|
||||
}
|
||||
|
||||
|
@ -86,10 +86,10 @@ class Clipboard extends Emitter {
|
||||
*/
|
||||
static isSupported(action = ['copy', 'cut']) {
|
||||
const actions = (typeof action === 'string') ? [action] : action;
|
||||
let support = !!document.queryCommandSupported;
|
||||
let support = !document.queryCommandSupported;
|
||||
|
||||
actions.forEach((action) => {
|
||||
support = support && !!document.queryCommandSupported(action);
|
||||
support = support && !document.queryCommandSupported(action);
|
||||
});
|
||||
|
||||
return support;
|
||||
|
Loading…
Reference in New Issue
Block a user