Register library update complete handler
- Since SDK: 20
Assign a function to be called when a library update has completed. The library update could result from calling updateLibrary from the JS API. The handler assignment replaces any previously registered handlers for library update notifications.
adobe.dps.store.registerLibraryUpdateCompleteHandler
| Parameter | Type | Description |
|---|---|---|
| callback | Register the handler that will be called when a libraryUpdate has occurred. |
registerLibraryUpdateCompleteHandlerFunction
API Snippet
registerLibraryUpdateCompleteHandler
<!DOCTYPE html PUBLIC "-/ / W3C/ / DTD XHTML 1.0 Transitional/ / EN" "http:/ / www.w3.org/ TR/ xhtml1/ DTD/ xhtml1- transitional.dtd"> <html xmlns= "http:/ / www.w3.org/ 1999/ xhtml"> <head> <meta http- equiv= "Content- Type" content= "text/ html; charset= UTF- 8" / > <title>registerLibraryUpdateCompleteHandler API</ title> <script type= "text/ javascript"> function registerUpdateLibraryHandler() { if (window.adobedpscontextloaded) { / / call into the updateLibrary API adobe.dps.store.registerLibraryUpdateCompleteHandler(libraryUpdateResponder); } } function unregisterUpdateLibraryHandler() { if (window.adobedpscontextloaded) { / / call into the updateLibrary API adobe.dps.store.unregisterLibraryUpdateCompleteHandler(libraryUpdateResponder); } } function libraryUpdateResponder() { alert("update library complete"); } function updateLibrary() { if (window.adobedpscontextloaded) { / / call into the updateLibrary API adobe.dps.store.updateLibrary(); } } </ script> </ head> <body> <br>Register an update library complete handler<button type= "button" onclick= "registerUpdateLibraryHandler()">Register Handler</ button> <br>Unregister an update library complete handler<button type= "button" onclick= "unregisterUpdateLibraryHandler()">Unregister Handler</ button> <br><button type= "button" onclick= "updateLibrary()">Update Library</ button> </ body> </ html>
