|
Last change
on this file since 2058e5c was 2058e5c, checked in by istevanoska <ilinastevanoska@…>, 6 months ago |
|
Working / before login
|
-
Property mode
set to
100644
|
|
File size:
531 bytes
|
| Rev | Line | |
|---|
| [2058e5c] | 1 | let Selector = require('../selector')
|
|---|
| 2 | let utils = require('../utils')
|
|---|
| 3 |
|
|---|
| 4 | class Autofill extends Selector {
|
|---|
| 5 | constructor(name, prefixes, all) {
|
|---|
| 6 | super(name, prefixes, all)
|
|---|
| 7 |
|
|---|
| 8 | if (this.prefixes) {
|
|---|
| 9 | this.prefixes = utils.uniq(this.prefixes.map(() => '-webkit-'))
|
|---|
| 10 | }
|
|---|
| 11 | }
|
|---|
| 12 |
|
|---|
| 13 | /**
|
|---|
| 14 | * Return different selectors depend on prefix
|
|---|
| 15 | */
|
|---|
| 16 | prefixed(prefix) {
|
|---|
| 17 | if (prefix === '-webkit-') {
|
|---|
| 18 | return ':-webkit-autofill'
|
|---|
| 19 | }
|
|---|
| 20 | return `:${prefix}autofill`
|
|---|
| 21 | }
|
|---|
| 22 | }
|
|---|
| 23 |
|
|---|
| 24 | Autofill.names = [':autofill']
|
|---|
| 25 |
|
|---|
| 26 | module.exports = Autofill
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.