()
| 1262 | } |
| 1263 | |
| 1264 | init() { |
| 1265 | for ( const element of MA.byId('prefcanvas').querySelectorAll('page-replace')) { |
| 1266 | const replaceType = element.safeAttribute('data-type') |
| 1267 | const replaceKey = element.safeAttribute('data-name') |
| 1268 | const replaceExt = element.safeAttribute('data-extra') |
| 1269 | |
| 1270 | switch ( replaceType ) { |
| 1271 | case 'version-input' : |
| 1272 | element.replaceWith(this.#doVersion(replaceKey)) |
| 1273 | break |
| 1274 | case 'button-input': |
| 1275 | element.replaceWith(this.#doButton(replaceKey)) |
| 1276 | break |
| 1277 | case 'special-input' : |
| 1278 | element.replaceWith(this.#doSpecial(replaceKey)) |
| 1279 | break |
| 1280 | case 'switch-input': |
| 1281 | element.replaceWith(this.#doSwitch(replaceKey, replaceExt || 3)) |
| 1282 | break |
| 1283 | default : |
| 1284 | break |
| 1285 | } |
| 1286 | } |
| 1287 | } |
| 1288 | |
| 1289 | forceUpdate() { |
| 1290 | for ( const update of this.update ) { |
no test coverage detected