-
-
Notifications
You must be signed in to change notification settings - Fork 3
Changed_in_007
Wesley De Groot edited this page Oct 30, 2015
·
12 revisions
_ _____
| | / ____|
| | | (___
_ | | \___ \
______ _ | |__| | ____) |
|______| (_) \____/ |______/
Yes, indeed, were using the 'unofficial' JS Standard Code Style (JSSCS)
Non-returning function, does nothing.
Append a element to...
Does the client support touch (events)?
....
Browser info
- (bool)
_.browser.ie
- (bool)
_.browser.firefox
- (bool)
_.browser.safari
- (bool)
_.browser.opera
- (bool)
_.browser.edge
- (bool)
_.browser.chrome
- (string)
_.browser.userAgent
- (bool)
_.browser.supportTouch
Browser name
Supported now!
window.addEventListener('_.jsLoaded', function() {
window.alert('_.js Loaded! (received)')
});
-
Please note that this will only work if you'll use:
<script type='text/javascript' src='https://raw.githubusercontent.com/wesdegroot/_.js/master/latest/_.js' async></script>
async makes the script (non-blocking) and this will give _.js
the opportunity to fire a event.
Please note: If you make it (non-blocking) you'll need to check if _.js
is loaded!
This means that for example this will not work if the script is async (non-blocking)
<script type='text/javascript' src='https://raw.githubusercontent.com/wesdegroot/_.js/master/latest/_.js' async></script>
<div class='inner'>Testing</div>
<script type='text/javascript'>
window.addEventListener('_.jsLoaded', function () {
window.alert('_.js Loaded! (received)')
})
_('.inner').html('Hi!') // Error, _ Undefined!!!
</script>
How it works with Async is:
<script type='text/javascript' src='https://raw.githubusercontent.com/wesdegroot/_.js/master/latest/_.js' async></script>
<div class='inner'>Testing</div>
<script type='text/javascript'>
window.addEventListener('_.jsLoaded', function () {
window.alert('_.js Loaded! (received)')
_('.inner').html('Hi!') // Error, _ Undefined!!!
})
</script>
© Wesley de Groot • CC-BY 4.0 • WDGWV