(channel)
| 89 | } |
| 90 | |
| 91 | function start(channel) { |
| 92 | gPasswordManager = channel.objects.PasswordManager; |
| 93 | if (!gPasswordManager) { |
| 94 | console.error('AutoFill: the password manager is null'); |
| 95 | return; |
| 96 | } |
| 97 | fill(); |
| 98 | attachFormListeners(); |
| 99 | // 观察 DOM 变化,给新表单也绑定 |
| 100 | var observer = new MutationObserver(function() { |
| 101 | attachFormListeners(); |
| 102 | }); |
| 103 | observer.observe(document, { childList: true, subtree: true }); |
| 104 | } |
| 105 | |
| 106 | function AutoFill() { |
| 107 | if (typeof QWebChannel === 'undefined') { |
no test coverage detected