you don't. you convert this to vanilla javascript. what this code looks like depends on which browsers you wish to support. jQuery abstracts the code, you will have to test for the browsers you want to support and perform the same code:
if you only want to support html 5 browsers, then ready can be replaced with something like:
(function() {
if ( document.readyState === "complete" ||
( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
window.setTimeout( ready );
} else {
document.addEventListener( "DOMContentLoaded", completed );
window.addEventListener( "load", completed );
}
function completed() {
document.removeEventListener( "DOMContentLoaded", completed );
window.removeEventListener( "load", completed );
ready();
}
})();
function ready() {
// do your ready code here
}
$('.page-header') can be replaced with (html 5 browsers):
Member
48 Points
265 Posts
Iframe height in knockou js
Sep 20, 2016 10:30 AM|gowrifor.net|LINK
Hi All,
I have a java script code snippet below
I have to convert this java script snippet to knockout js , I am very new to Knockout and have no clue how to do it , Could any one please help me ?
Thanks
*********************************************************
Thanks,
All-Star
57874 Points
15509 Posts
Re: Iframe height in knockou js
Sep 20, 2016 03:36 PM|bruce (sqlwork.com)|LINK
you don't. you convert this to vanilla javascript. what this code looks like depends on which browsers you wish to support. jQuery abstracts the code, you will have to test for the browsers you want to support and perform the same code:
if you only want to support html 5 browsers, then ready can be replaced with something like:
$('.page-header') can be replaced with (html 5 browsers):
document.querySelector(".page-header")
see dom docs for measurements