Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Deno port of `htmlparser2`

NotificationsYou must be signed in to change notification settings

tbjgolden/deno-htmlparser2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deno port of HTML Parser 2 (and its dependencies).

// directimport{Parser}from"https://rawcdn.githack.com/tbjgolden/deno-htmlparser2/451e3693f15dd2735283e65085edf3db94587d10/htmlparser2/index.ts";constparser=newParser({onopentag(name,attribs){if(name==="script"&&attribs.type==="text/javascript"){console.log("JS! Hooray!");}},ontext(text){console.log("-->",text);},onclosetag(tagname){if(tagname==="script"){console.log("That's it?!");}},onend(){console.log("Done");},},{decodeEntities:true},);parser.write("Xyz <script type='text/javascript'>var foo = '<<bar>>';</ script>",);parser.end();

logs

--> Xyz JS! Hooray!--> var foo = '--> <--> <bar>>';That's it?!Done

See htmlparser2 for documentation and for any issues that are present in both this port and the original project.

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp