 c177363a19
			
		
	
	c177363a19
	
	
	
		
			
			🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
		
			
				
	
	
		
			27 lines
		
	
	
		
			531 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			531 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| let Selector = require('../selector')
 | |
| let utils = require('../utils')
 | |
| 
 | |
| class Autofill 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-autofill'
 | |
|     }
 | |
|     return `:${prefix}autofill`
 | |
|   }
 | |
| }
 | |
| 
 | |
| Autofill.names = [':autofill']
 | |
| 
 | |
| module.exports = Autofill
 |