hashchange / jquery.documentsize Goto Github PK
View Code? Open in Web Editor NEWDetects the real width and height of a document. And the real width and height of the browser window.
License: MIT License
Detects the real width and height of a document. And the real width and height of the browser window.
License: MIT License
I'm getting a warning in web.dev & Chrome, caused by this library using document.write
:
https://developers.google.com/web/updates/2016/08/removing-document-write
Is there a way to change visual viewport by code?
Thanks
Hi there, correct me if I'm wrong but isn't $.windowHeight("visual")
suppose to prevent the changing window height on mobile browsers?
I may have implemented this wrong, can you help?
Thanks
Assuming that I already have a window/document object globally available for this library to do its work, how should I import it and bind it in node.js?
I was expecting something like const $ = require(jquery.documentsize);
to work, but that's not working.
According to the documentation, this library needs a $
to binds itself to that variable, but I still don't understand how I make the library available to a hypothetical var $ = {}
object if I'm not explicitly calling it against its import variable.
So what's the correct version of using this with Node.JS. Again, you can assume that I already have a window object. For the sake of the example something like this:
require("jsdom").env("", function(err, window) {
if (err) {
console.error(err);
return;
}
Any ideas?
Cheers,
This is a great tool with excellent documentation. It solved a long-time problem I've been having a surprising amount of trouble finding a solution to: effective viewable height vs. viewport / screen height on Mobile Safari.
Many cheers. Would donate if a link were available ๐ฐ
Hello, I've just sourced a strange scenario whereby IE9 does not fire the window.onload event until the mouse is moved when documentsize is included on the page. Remove the library and the problem goes away. I can provide a video of the behaviour if required. Do you know what could be wrong?
I know support is listed as >=IE8
but is there any way of solving the compilation error you get with IE6/7
? On page load I get a type mismatch
error refering to document.body.removeChild( iframe );
within testDocumentScroll()
?
Could a check be incorporated to subvert the error?
Thanks
I tried the following code with Chrome on Android and the pinchZoomFactor() always returns 1. Is this expected/normal?
<html>
<head>
</head>
<body>
<div>
Page Zoom: ...
</div>
</body>
<script>
let $ = {};
</script>
<script src="jquery.documentsize.js">
</script>
<script>
document.addEventListener("touchend", () =>
{
setTimeout(() => {
document.body.innerHTML = "Zoom level: " + $.pinchZoomFactor().toString();
}, 500);
}, false);
</script>
</html>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.