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
| <html> | |
| <head> | |
| <script | |
| src="https://code.jquery.com/jquery-3.3.1.min.js" | |
| integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" | |
| crossorigin="anonymous"></script> | |
| </head> | |
| <body> | |
| <h1>Test race condition</h1> |
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 init () { | |
| let paragraph = document.querySelector('.entry-content p'); | |
| paragraph.addEventListener('click', clicked); | |
| } | |
| function clicked () { | |
| console.log(this); | |
| } | |
| init(); |
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
| var myObj = { | |
| init: function () { | |
| var paragraph = $('.entry-content p'); | |
| paragraph.on('click', this.clicked); | |
| }, | |
| clicked: function () { | |
| console.log(this); | |
| } | |
| }; |
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 () { | |
| var articleImage = document.querySelectorAll('.article img'), | |
| nextArrow = document.getElementById('#nextArrow'), | |
| previousArrow = document.getElementById('prevArrow'); | |
| articleImage.addEventListener('click', openGallery); | |
| nextArrow.addEventListener('click', showNextImage) | |
| previousArrow.addEventListener('click', showPreviousImage) | |
| function openGallery() { |
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
| var gulp = require('gulp'), | |
| ts = require('gulp-typescript'), | |
| options = { | |
| target: 'ES6', | |
| noImplicitAny: true, | |
| removeComments: false, | |
| declarationFiles: false, | |
| sortOutput: true, | |
| suppressImplicitAnyIndexErrors: true | |
| }; |