Bug 120963 - API for enumerating SCRIPTs in an HTML document
Summary: API for enumerating SCRIPTs in an HTML document
Status: RESOLVED WONTFIX
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.sse (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P2 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Nitin Dahyabhai CLA
QA Contact:
URL:
Whiteboard: Investigate for 300
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2005-12-14 16:27 EST by Adam Peller CLA
Modified: 2010-04-07 21:41 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Peller CLA 2005-12-14 16:27:59 EST
see 120961 for how I'm currently identifying SCRIPT tags within an HTML document

It would be nice to have a formal API abstracting this, but also to return SCRIPT which is inside HTML attributes (anything defined as Script by the HTML DTD)  For completeness, the ideal API would also provide the type of any of this script, as defined by type attributes or defaults in the HTML document.  Hopefully this would be available to JSP, XHTML or other HTML-derived documents as well.
Comment 1 Adam Peller CLA 2005-12-14 16:28:51 EST
if it is possible to identify the script attributes through current APIs, please let me know. thanks
Comment 2 Adam Peller CLA 2005-12-14 16:57:18 EST
oh yeah, forgot to mention that the line number and offset are also needed, which I think is what prevented me from just walking the DOM in the first place.
Comment 3 David Williams CLA 2005-12-19 01:57:48 EST
My guess is we have half a dozon internal ways of doing this ... and its a fair request to settle on one as the API way to do it. 

Comment 4 Adam Peller CLA 2006-05-31 16:16:08 EDT
David, short of revamping the APIs, is there currently a way to identify HTML attributes which are of type script? (e.g. onClick="...")
Comment 5 Robert Goodman CLA 2006-07-31 21:46:26 EDT
When designing the API for this bug, the API should also handle the bug 108860. As additional script languages are supported in html files (php, python, etc), the validators for those languages will need to be able to process their regions. These script languages will use different tags to specify their regions. For example, some of possible php tags are <?php ?>,  <? ?>  and <%php %>.
Comment 6 Nitin Dahyabhai CLA 2007-09-13 05:21:48 EDT
Can't promise we'll have time to do it ourselves (high quality patches welcomed!), but we'll try to look at it for 3.0.
Comment 7 Ian Tewksbury CLA 2010-04-05 13:39:49 EDT
Is this API something that would still be useful?
Comment 8 Nitin Dahyabhai CLA 2010-04-07 21:41:31 EDT
Resolving.  Please reopen if it's still wanted.  Comment 5 sounded like a different function altogether.