Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
27 lines
598 B
Plaintext
27 lines
598 B
Plaintext
let Selector = require('../selector')
|
|
let utils = require('../utils')
|
|
|
|
class FileSelectorButton extends Selector {
|
|
constructor(name, prefixes, all) {
|
|
super(name, prefixes, all)
|
|
|
|
if (this.prefixes) {
|
|
this.prefixes = utils.uniq(this.prefixes.map(() => '-webkit-'))
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Return different selectors depend on prefix
|
|
*/
|
|
prefixed(prefix) {
|
|
if (prefix === '-webkit-') {
|
|
return '::-webkit-file-upload-button'
|
|
}
|
|
return `::${prefix}file-selector-button`
|
|
}
|
|
}
|
|
|
|
FileSelectorButton.names = ['::file-selector-button']
|
|
|
|
module.exports = FileSelectorButton
|