GitHub Package
the javascript
30 - HTML Element Type Checks

Error found by PRE_check_changeToSubmit() when attempting to set a-table to have the type of 'submit'.
function changeToSubmit(id) Change HTML Element to Submit Button
OK, change plain button into Submit button now a submit button
Error, change a-table into a Submit button
a-table cannot be a Submit button

HTML elements can have their types checked.
a_div = document.querySelector('div')
div_type = type_czech.typeFinal(a_div)    //HTMLDivElement
HTML elements can also be queried for their prototypes chain.
a_div = document.querySelector('div')
div_protos=type_czech.typeProtos(a_div)//["HTMLDivElement","HTMLElement 
And finally, HTML elements can also be asked their object type.
a_div = document.querySelector('div')
isa_HTMLElem = type_czech.typeIsA(a_div, 'HTMLElement')  // true

Two errors are found by PRE_check_alterImgHref() when trying to set a-div to have a location address, in blue text. And, when incorrectly setting a-picture's src location to a local anchor in green text.
function alterImgHref(id, addr) Alter Image or Href Address
OK, alter a Link's Address from cnn.com to xe.com was CNN.com, now XE.com
OK, alter Image's Address from BEFORE to AFTER
Error, alter a-div's Address
a-div is a div
Error, alter a-picture's Address to a # Local Anchor

Contents 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43    101 102 103 201 202 203 204 301 302 303 304 401 402 403 404 501 502 503 504 601 602 603 604    700 701 702 703 704 705 706 707 708 709 710 © 2024 Steen Hansen



Console Output