Created
November 30, 2016 03:32
-
-
Save dsharrison/bf2ceaf22820bbfb79cef042fd2e5d8d to your computer and use it in GitHub Desktop.
Reduced test case for locker service dynamic component DOM access.
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 access="PUBLIC"> | |
<!-- public methods --> | |
<aura:method name="stuff" action="{!c.doStuff}" access="PUBLIC"/> | |
<!-- markup --> | |
<div aura:id="findMe"></div> | |
</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
({ | |
doStuff: function (component, event, helper) { | |
var viewCmp = component.find('findMe'); | |
if(typeof viewCmp.getElement !== 'function') { | |
alert('getElement() not available!'); | |
} else { | |
alert('getElement() was found on the view!'); | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment