Closed
Bug 617331
Opened 14 years ago
Closed 10 years ago
figure out the "right" way to handle dynamically added and removed viewport meta tags
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
DUPLICATE
of bug 976616
People
(Reporter: blassey, Unassigned)
References
Details
(Keywords: compat, mobile)
In bug 615617 we matched webkit's behavior, but we should figure out what the correct behavior should be.
Updated•14 years ago
|
Updated•14 years ago
|
Summary: figure out the "right" way to handle dynamically added and removed meta tags → figure out the "right" way to handle dynamically added and removed viewport meta tags
Hi!
I'm a user, fan, web dev. I'd love to be able to adjust the viewport dynamically. The way I'm doing it now, works on most browsers, is this:
// in jade (sorry)
meta(id='viewport', name='viewport', content='width=600px')
script(type="text/javascript").
(function () {
"use strict";
var viewport = document.getElementById('viewport');
if (window.innerWidth > 600 || screen.width > 600) {
viewport.setAttribute('content', 'width=device-width');
}
}());
I think in the end viewport will end up in CSS as well as HTML, but the ability to set a min-width would be heaven, that's all I'm really trying to acheive. I don't think dynamically changing viewports will be relevant until we all live in the matrix anyways, or until samsung invents foldable or stretchable touch screens : )
Comment 2•10 years ago
|
||
Forward-duping to mentored bug with test case attached.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•