|
124 | 124 | dom.optExpand.checked = false
|
125 | 125 | dom.optVertical.checked = false
|
126 | 126 | dom.optUnstyled.checked = false
|
127 |
| -dom.optEverything.checked = false //false |
| 127 | +dom.optEverything.checked = false |
128 | 128 |
|
129 | 129 | let oData = {}
|
130 | 130 |
|
|
236 | 236 | email: '<input id="X" type="email">',
|
237 | 237 | month: '<input id="X" type="month">',
|
238 | 238 | password: '<input id="X" type="password">',
|
239 |
| - progress: '<progress id="X"></progress>', |
240 | 239 | search: '<input id="X" type="search">',
|
241 | 240 | tel: '<input id="X" type="tel">',
|
242 | 241 | text: '<input id="X" type="text">',
|
243 | 242 | url: '<input id="X" type="url">',
|
244 | 243 | week: '<input id="X" type="week">',
|
245 |
| - // last of the inputs |
| 244 | + // last of the inputs/forms |
| 245 | + progress: '<progress id="X"></progress>', |
246 | 246 | textarea: '<textarea id="X"></textarea>',
|
247 | 247 | textarea_3rows_5cols: '<textarea id="X" cols="5" rows="3"></textarea>',
|
248 | 248 | }
|
249 | 249 |
|
| 250 | + let aNumberGroup = ['number','datetime','email','month','password','search','tel','text','url','week',] |
| 251 | + |
250 | 252 | if (isExpanded) {
|
251 | 253 | for (const k of Object.keys(oListExtra)) {
|
252 | 254 | oList[k] = oListExtra[k]
|
|
283 | 285 | target = document.getElementById("X")
|
284 | 286 | target.setAttribute("style","display:inline; writing-mode: "+ writingstring +";")
|
285 | 287 | if (isUnstyled) {target.classList.add('unstyled')}
|
286 |
| - if (k.slice(0,8) == "select_m") { |
287 |
| - let group = "select_multiple" |
| 288 | + |
| 289 | + let isNumberGroup = (aNumberGroup.includes(k) && isExpanded) |
| 290 | + if (k.slice(0,8) == "select_m" || isNumberGroup) { |
| 291 | + let group = isNumberGroup ? "number [in gecko these should be identical]" : "select_multiple" |
288 | 292 | if (isEverything) {
|
289 | 293 | if (tmpData[style][writingstyle][group] == undefined) {tmpData[style][writingstyle][group] = {}}
|
290 | 294 | } else {
|
291 | 295 | if (tmpData[group] == undefined) {tmpData[group] = {}}
|
292 | 296 | }
|
293 |
| - let method = k.slice(9, k.length) |
| 297 | + let method = isNumberGroup ? k : k.slice(9, k.length) |
294 | 298 | // element
|
295 | 299 | try {
|
296 | 300 | data = [
|
|
303 | 307 | if (isEverything) { tmpData[style][writingstyle][group][method] = ["error"] } else { tmpData[group][method] = ["error"] }
|
304 | 308 | }
|
305 | 309 | // option
|
306 |
| - data = [] |
307 |
| - try { |
308 |
| - target = document.getElementById("Y") |
309 |
| - data = [ |
310 |
| - target.getBoundingClientRect().width, target.getBoundingClientRect().height, |
311 |
| - target.getBoundingClientRect().x, target.getBoundingClientRect().y, |
312 |
| - ] |
313 |
| - if (isEverything) { tmpData[style][writingstyle][group][method +"_option"] = data } else { tmpData[group][method +"_option"] = data } |
314 |
| - } catch(e) { |
315 |
| - if (isEverything) { tmpData[style][writingstyle][group][method +"_option"] = ["error"] } else { tmpData[group][method +"_option"] = ["error"] } |
| 310 | + if (!isNumberGroup) { |
| 311 | + data = [] |
| 312 | + try { |
| 313 | + target = document.getElementById("Y") |
| 314 | + data = [ |
| 315 | + target.getBoundingClientRect().width, target.getBoundingClientRect().height, |
| 316 | + target.getBoundingClientRect().x, target.getBoundingClientRect().y, |
| 317 | + ] |
| 318 | + if (isEverything) { tmpData[style][writingstyle][group][method +"_option"] = data } else { tmpData[group][method +"_option"] = data } |
| 319 | + } catch(e) { |
| 320 | + if (isEverything) { tmpData[style][writingstyle][group][method +"_option"] = ["error"] } else { tmpData[group][method +"_option"] = ["error"] } |
| 321 | + } |
316 | 322 | }
|
317 | 323 | } else {
|
318 | 324 | data = [
|
|
323 | 329 | }
|
324 | 330 | } catch(e) {
|
325 | 331 | if (isEverything) { tmpData[style][writingstyle][k] = ["error"] } else { tmpData[k] = ["error"] }
|
326 |
| - console.log(k, e) |
| 332 | + //console.log(k, e) |
327 | 333 | }
|
328 | 334 | }
|
329 | 335 | })
|
330 | 336 | })
|
331 | 337 |
|
332 | 338 | parent.innerHTML = "" // just in case
|
333 | 339 | oData = {} // reset
|
334 |
| - for (const k of Object.keys(tmpData).sort()) {oData[k] = tmpData[k]} |
| 340 | + for (const k of Object.keys(tmpData).sort()) { |
| 341 | + if (isEverything) { |
| 342 | + oData[k] = {} |
| 343 | + for (const j of Object.keys(tmpData[k]).sort()) { |
| 344 | + oData[k][j] = {} |
| 345 | + for (const m of Object.keys(tmpData[k][j]).sort()) { |
| 346 | + oData[k][j][m] = tmpData[k][j][m] |
| 347 | + } |
| 348 | + } |
| 349 | + } else { |
| 350 | + oData[k] = tmpData[k] |
| 351 | + } |
| 352 | + } |
335 | 353 | let hash = mini(oData), notation = ""
|
336 | 354 |
|
337 | 355 | let t1 = performance.now()
|
|
0 commit comments