Skip to content

Instantly share code, notes, and snippets.

@myfonj
Last active June 25, 2024 22:11
Show Gist options
  • Save myfonj/d8378e884fab165368e4cf1f2b8fb104 to your computer and use it in GitHub Desktop.
Save myfonj/d8378e884fab165368e4cf1f2b8fb104 to your computer and use it in GitHub Desktop.
@namespace "http://www.w3.org/1999/xhtml";
/*
Matches any non-built in element *from the HTML namespace*
- Credits: https://meiert.com/en/indices/html-elements/ (every existing tag)
- Data obtained from the page through devtools console:
copy($$('th[scope="row"] a code')
.map(_ => _.textContent)
.filter(_ => HTMLUnknownElement !== document.createElement(_).constructor)
.join()
)
- this discards just `applet`, `isindex`, and `nextid`,
leaving 17 more non(-living)-standard elements still supported
- As for https://twitter.com/RogersKonnor/status/1805341171960688728
*/
:not(a,abbr,acronym,address,area,article,aside,audio,b,base,basefont,bdi,bdo,big,blockquote,body,br,button,canvas,caption,center,cite,code,col,colgroup,data,datalist,dd,del,details,dfn,dialog,dir,div,dl,dt,em,embed,fieldset,figcaption,figure,font,footer,form,frame,frameset,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,i,iframe,img,input,ins,kbd,label,legend,li,link,listing,main,map,mark,menu,meta,meter,nav,noframes,noscript,object,ol,optgroup,option,output,p,param,picture,plaintext,pre,progress,q,rb,rp,rt,rtc,ruby,s,samp,script,search,section,select,slot,small,source,span,strike,strong,style,sub,summary,sup,table,tbody,td,template,textarea,tfoot,th,thead,time,title,tr,track,tt,u,ul,var,video,wbr,xmp){}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment