This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
doInit : function(component, event, helper) { | |
console.log('window object -->'+window.toString()); | |
console.log('document object -->'+document.toString()); | |
var divElement = document.getElementById("testClass"); | |
var liButton = component.find("libutton"); | |
console.log('liButton--> '+liButton); | |
console.log('div element -->'+divElement.toString()); | |
console.log('inner html -->'+divElement.parentNode.innerHTML); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component > | |
<!--LockerServiceTestComp--> | |
<lightning:button aura:id="libutton" onclick="{! c.doInit}"> | |
<div id="testClass"> | |
Press Here | |
</div> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
getData : function(component, event) { | |
console.log('inside init getData'); | |
var recId = component.get("v.recordId"); | |
var dataAction = component.get("c.getAccount"); | |
dataAction.setParams({accountId : recId}); | |
dataAction.setCallback(this, function(response){ | |
var state = response.getState(); | |
if(state=='SUCCESS') | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
doInit : function(component, event, helper) { | |
helper.getData(component, event); | |
}, | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component controller="FetchData" implements="force:appHostable,flexipage:availableForRecordHome,force:hasRecordId"> | |
<!--forceRefreshViewComp--> | |
<aura:handler name="init" value="{! this}" action="{! c.doInit}" /> | |
<aura:handler event="force:refreshView" action="{! c.doInit}" /> | |
<aura:attribute name="account" type="Account" /> | |
<lightning:card title="Account Detail"> | |
<div class="slds-m-horizontal_small"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
createContact : function(component, event, helper) { | |
console.log('inside create contact'); | |
$A.get('e.force:refreshView').fire(); | |
console.log('event fired'); | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component implements="force:appHostable,flexipage:availableForRecordHome"> | |
<!--forceRefreshViewFireComp--> | |
<aura:attribute name="fieldList" type="List" default="LastName, FirstName" /> | |
<lightning:card title="Create Contact"> | |
<div class="slds-m-horizontal_small"> | |
<lightning:recordForm | |
objectApiName="Contact" | |
layoutType="Compact" | |
columns="2" | |
mode="edit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
doInit : function(component, event, helper) { | |
console.log('event firing'); | |
var cmpEvt = component.getEvent("bubbleCaptureEvent"); | |
cmpEvt.fire(); | |
}, | |
handleBubbling : function(component, event, helper) { | |
console.log('handler bubble in ---source'); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component > | |
<!--sourceComp--> | |
<aura:registerEvent name="bubbleCaptureEvent" type="c:bubbleCaptureEvent" /> | |
<aura:handler name="bubbleCaptureEvent" event="c:bubbleCaptureEvent" action="{!c.handleCapture}" phase="capture"/> | |
<!--<aura:handler name="bubbleCaptureEvent" event="c:bubbleCaptureEvent" action="{!c.handleBubbling}"/>--> | |
<aura:handler name="init" value="{! this}" action="{!c.doInit}"/> | |
</aura:component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
handleBubbling : function(component, event, helper) { | |
console.log('handler bubble in ---container'); | |
}, | |
handleCapture : function(component, event, helper) { | |
console.log('handler capture in ---container'); | |
}, | |
}) |