(cssContent)
| 304 | } |
| 305 | |
| 306 | assessBrowserSupport(cssContent) { |
| 307 | const support = { |
| 308 | chrome: '完全支持', |
| 309 | firefox: '完全支持', |
| 310 | safari: '完全支持', |
| 311 | edge: '完全支持', |
| 312 | ie: '不支持' |
| 313 | }; |
| 314 | |
| 315 | // 检查新特性 |
| 316 | const modernFeatures = { |
| 317 | 'clip-path': { safari: '部分支持', ie: '不支持' }, |
| 318 | 'mask': { safari: '需要前缀', ie: '不支持' }, |
| 319 | '@property': { firefox: '部分支持', safari: '部分支持', ie: '不支持' }, |
| 320 | 'backdrop-filter': { firefox: '部分支持', ie: '不支持' }, |
| 321 | 'grid': { ie: '部分支持' }, |
| 322 | 'custom-property': { ie: '不支持' } |
| 323 | }; |
| 324 | |
| 325 | Object.entries(modernFeatures).forEach(([feature, limitations]) => { |
| 326 | if (cssContent.includes(feature)) { |
| 327 | Object.assign(support, limitations); |
| 328 | } |
| 329 | }); |
| 330 | |
| 331 | return support; |
| 332 | } |
| 333 | |
| 334 | async saveToDatabase(category, filename, parsedContent) { |
| 335 | const insertSQL = ` |
no outgoing calls
no test coverage detected