Skip to content

Use Feature Detection instead of Browser Sniffing - #54

Open
willsp wants to merge 1 commit into
tombigel:masterfrom
willsp:FixFeatureDetection
Open

Use Feature Detection instead of Browser Sniffing#54
willsp wants to merge 1 commit into
tombigel:masterfrom
willsp:FixFeatureDetection

Conversation

@willsp

@willsp willsp commented Sep 18, 2014

Copy link
Copy Markdown

While the previous implementation used feature detection, it was using
it wrong. It was, essentially using feature detection as a more advanced
browser sniffer.

  • Updated this to detect the features actually being used to measure
    zoom.
  • Moved the functions to the same place as the checks, to make it
    easier to keep the 2 connected.
  • Made some adjustments so it passes jshint.
  • This fixes a bug with iOS8 Safari.

While the previous implementation used feature detection, it was using
it wrong. It was, essentially using feature detection as a more advanced
browser sniffer.

* Updated this to detect the features actually being used to measure
  zoom.
* Moved the functions to the same place as the checks, to make it
  easier to keep the 2 connected.
* Made some adjustments so it passes jshint.
@bradvogel

Copy link
Copy Markdown

This unfortunately doesn't work within iframes.

@willsp

willsp commented Nov 10, 2015

Copy link
Copy Markdown
Author

Ah, that's not cool... Not really a use case for us. Did the original work with iframes?

If you have any suggestions (or better yet, code), let me know and I'll see if I can make it work...

@bradvogel

Copy link
Copy Markdown

Never tried the original. Seems to be a couple of years out date. Lack of iframe support shouldn't prevent you from merging though - this PR is still very useful! I'll look into adding support for iframes.

@ericsaboia

Copy link
Copy Markdown

any updates on this?

@willsp

willsp commented Apr 21, 2016

Copy link
Copy Markdown
Author

@ericsaboia Nope... Sorry. I'm no longer using it, so have little reason to get it working for iframes. If you fix it and submit a pull request to my fork, I'll merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants