Modifying HTML output using workers


#1

Are there examples of modifying say the title tag or the meta description using the DOM as a way of identifying those elements?

I don’t want to try to just pattern match on “” and hope the HTML is the same across the site. I want to find it using a logical language structure like:
document.getElementsByName(‘meta’)[0].getAttribute(‘description’)

To then find and replace on.

I can play / figure this out but if folks have started down this path or have ideas, would love to hear them!

I can share what I find / learn if folks want.

Thanks!


#3
I don't want to try to just pattern match on "<meta description='bob'>" and hope the HTML is the same across the site. 

#4

I believe the answer to this is the same as to your other question (Possible to fetch HTML from a URL and DOM Parse it?).