Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

13
LINES

< > BotCompany Repo | #1031614 // allJavascriptFromHTMLIncludingEventHandlers

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (5324L/33K).

static LS allJavascriptFromHTMLIncludingEventHandlers(S html) {
  ret allJavascriptFromHTMLIncludingEventHandlers(htmlTok(html));
}

static LS allJavascriptFromHTMLIncludingEventHandlers(LS tok) {
  LS list = allJavascriptFromHTML(tok);
    
  for (S tag : codeTokens(tok))
    for (S key, S value : tagParams(tag))
      if (swic(key, "on")) list.add(value);
      
  ret list;
}

Author comment

Began life as a copy of #1031449

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031614
Snippet name: allJavascriptFromHTMLIncludingEventHandlers
Eternal ID of this version: #1031614/3
Text MD5: 757461241d7adf623faffc05fb8e8989
Transpilation MD5: 60d67a938b33137e28bbf9f70b0b5e6c
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-22 11:10:20
Source code size: 392 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 189 / 244
Version history: 2 change(s)
Referenced in: [show references]