Created
May 11, 2016 21:28
-
-
Save AlexandreBonaventure/adead49ed02af9b1589ed3454fbe30c0 to your computer and use it in GitHub Desktop.
[HYPE] getSymbolInstance
This file contains hidden or 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
function getSymbolInstanceForElement(hypeDocument, element, event) { | |
var symbolInstance = null; | |
var parentSymbolElement = element.parentNode; | |
while (symbolInstance == null && parentSymbolElement != null) { | |
symbolInstance = hypeDocument.getSymbolInstanceById(parentSymbolElement.id); | |
parentSymbolElement = parentSymbolElement.parentNode; | |
} | |
console.log(symbolInstance); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment