MyHtml class
Constructors
MyHtml ()
Returns an existing singleton.
factory
Properties
hashCode
→ int
The hash code for this object.
no setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString ()
→ String
A string representation of this object.
inherited
Static Methods
alterAttribute (Element node , String attribute , Object ? alter (Object ? a ) )
→ dynamic
Alters a specific attribute
of a HTML Element , node
by applying function alter
to the attribute
.
createElementFromHTML (String htmlFragment )
→ Element
Creates an HTML element from any valid htmlFragment
of HTML.
iterateHTMLDOM (Element DOM , _MyHtml_Element_Process process )
→ dynamic
Applies a process
to every element of a HTML DOM
element
(or any other HTML Element ).
logMessageIntoHTMLBodyComment (String message , [Node ? node ])
→ dynamic
adds a debug message
into the body of the HTML page or a specified node
.
removeAllHandlers (HtmlDocument htmlDoc , [HtmlElement ? selected = null ])
→ void
Removes all event handlers from all elements except selected
on the browser DOM.
removeAllOverlays (HtmlDocument htmlDoc , [bool allowRedirect = true ])
→ dynamic
Removes any element that obscures another element from htmlDoc
.
removeAllScripts (HtmlDocument htmlDoc )
→ dynamic
Removes suspect script tags from htmlDoc
.
removeEventHandler (Element e )
→ void
Removes event handlers from an element e
removeUrlRedirect (String originalUrl )
→ String ?
Changes originalURL
to remove any attempt at redirection.
resolveElementUrl (Element childElement , String baseUrl )
→ dynamic
Converts src and href attributes to be absolute URL's.
retargetAllHrefs (HtmlDocument htmlDoc , [String target = '_blank' ])
→ dynamic
Changes the target of all anchor href elements in htmlDoc
.
setUriParameters (String originalUrl , {String ? searchFor , String ? replacementParameters })
→ String
Changes originalURL
to remove parameters.
Optionally can replace old parameters with replacementParameters
.
Optionally can test for the presence of searchFor
to identify URIs that should be modified.
setUriSchemeToHttp (String originalURL )
→ String ?
Changes originalURL
to use the http protocol if none specified.
stripDownPage (dynamic target , [HtmlElement ? selected = null ])
→ dynamic
Remove unwanted HTML Element tags from a HtmlDocument or ParentNode