Skip to content

Instantly share code, notes, and snippets.

@choudharymanish8585
Created October 4, 2018 01:31
Show Gist options
  • Save choudharymanish8585/4ac0b660928c808472f9080ce411e6de to your computer and use it in GitHub Desktop.
Save choudharymanish8585/4ac0b660928c808472f9080ce411e6de to your computer and use it in GitHub Desktop.
({
/**
* Read all data and display at the bottom of the component
* */
readAllData: function(component, event, helper) {
component.set("v.showAll", "block");
//Read c:CustomComponent2 inner HTML
document.querySelector('#all-custom-output').textContent = document.querySelector('#div-custom').innerHTML;
//Read ui:outputText inner HTML
document.querySelector('#all-ui-output').textContent = document.querySelector('#div-ui').innerHTML;
//Read managed package inner HTML
document.querySelector('#all-managed-output').textContent = document.querySelector('#div-managed').innerHTML;
//Read system/undocumented api
document.querySelector('#all-system-output').textContent = $A.eventService;
},
/**
* Read custom component
* */
readCustomComponent : function(component, event, helper) {
document.querySelector('#custom-output').textContent = document.querySelector('#div-custom').innerHTML;
},
/**
* Read ui component
* */
readUIComponent : function(component, event, helper) {
document.querySelector('#ui-output').textContent = document.querySelector('#div-ui').innerHTML;
},
/**
* Read managed package component
* */
readMPComponent : function(component, event, helper) {
document.querySelector('#managed-output').textContent = document.querySelector('#div-managed').innerHTML;
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment