0

Right so I am a beginner to web development and I came across this piece of code:

$('#tweet-quote').on('click', function() {
 if(!inIframe()) {
  openURL('https://twitter.com/intent/tweet?hashtags=quotes&related=freecodecamp&text=' + encodeURIComponent('"' + currentQuote + '" ' + currentAuthor));
 }
});

I understand everything except this

inIframe()

what is this function? I cant find anything on this particular function.

  • It's not a native JavaScript or jQuery function. Probably from some third part library. See https://stackoverflow.com/questions/326069/how-to-identify-if-a-webpage-is-being-loaded-inside-an-iframe-or-directly-into-t – j08691 Dec 13 '18 at 18:14
  • 2
    it should be a defined function in a code! it's not a built-in function – Iman Dec 13 '18 at 18:15
  • Oh shite you are right. Pardon me – Zeeshan Mahmood Dec 14 '18 at 10:52

0 Answers0