DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone >

DOMAssistant 2.7.2 Adds triggerEvent And replace Methods

Schalk Neethling user avatar by
Schalk Neethling
·
Sep. 22, 08 · · News
Like (0)
Save
Tweet
440 Views

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:

triggerEvent(evt, target)

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.

Example:

$$(”myButton”).triggerEvent(”click”);

$(”tr.blue”).triggerEvent(”customevent”, myelement);

replace(content, returnNew) 

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.

Example:

$$(”para”).replace(”<div>Testing <i>new</i> method</div>”, true);

$(”div.odd”).replace(myelement);

Download the new version

 Go to the download page and try it out!

Element Event Download Strings Release (agency) Data Types

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How to Determine if Microservices Architecture Is Right for Your Business
  • Testing Schema Registry: Spring Boot and Apache Kafka With JSON Schema
  • A Smarter Redis
  • Debugging Java Collections Framework Issues in Production

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo