DOMAssistant 2.7.2 Adds triggerEvent And replace Methods
Join the DZone community and get the full member experience.Join For Free
DOMAssistant has just announced the release of DOMAssistant 2.7.2 beyond the bug fixes they introduced to new methods triggerEvent and replace. Bug fixed include:
- Fixed regression bug on $ with multiple arguments
- Fixed passed parameters not checked before their usage in attrToXpath()
- Fixed buggy :checked behavior in non-IE browsers
- Two new methods preview: triggerEvent() and replace()
Looking at the two new method:
Calls the event handler for event evt of the current element. You can optionally specify the target element to which the event is dispatched. Note that the actual event does not happen - it merely triggers the event handler itself.
This method differs from replaceContent() in that it does not replace the content - it replaces the current element with the new content. Content can be string, numbers or element. By default this method returns the replaced element, but you can have the new element returned by setting returnNew to true.
$$(”para”).replace(”<div>Testing <i>new</i> method</div>”, true);
Download the new version
Go to the download page and try it out!
Opinions expressed by DZone contributors are their own.