@manhng

Welcome to my blog!

JavaScript in iFrame

March 6, 2020 14:07

JavaScript (edit)

Getting the ID of the element that fired an event

event.target.id 

https://stackoverflow.com/questions/48239/getting-the-id-of-the-element-that-fired-an-event

https://stackoverflow.com/questions/2490825/how-to-trigger-event-in-javascript

How to Use Different CSS Style Sheets For Different Browsers (and How to Hide CSS Code from Older Browsers)

https://developer.mozilla.org/en-US/docs/Web/CSS/appearance (HAY)

Handling CSS prefixes

Another set of problems comes with CSS prefixes — these are a mechanism originally used to allow browser vendors to implement their own version of a CSS (or JavaScript) feature while the technology is in an experimental state, so they can play with it and get it right without conflicting with other browser's implementations, or the final unprefixed implementations. So for example:

  • Mozilla uses -moz-
  • Chrome/Opera/Safari use -webkit-
  • Microsoft uses -ms-

Handling common HTML and CSS problems

https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/HTML_and_CSS

Learn about Flexbox and CSS Grids

Advanced Cross-Browser Flexbox

https://dev.opera.com/articles/advanced-cross-browser-flexbox/

http://particletree.com/features/dynamic-resolution-dependent-layouts/

https://www.thesitewizard.com/css/excludecss.shtml

https://stackoverflow.com/questions/14227531/different-css-for-each-browser

https://www.codeproject.com/Tips/1167666/How-to-Apply-CSS-HACKS-for-Different-Browsers-Chro

https://css-tricks.com/resolution-specific-stylesheets/

CSS Examples

https://dev.opera.com/articles/advanced-cross-browser-flexbox/case-study/

https://css-tricks.com/examples/ResolutionDependantLayout/example-one.php

JavaScript in iFrame

https://stackoverflow.com/questions/13439303/detect-click-event-inside-iframe

https://stackoverflow.com/questions/26285955/how-to-display-an-iframe-on-button-click

https://stackoverflow.com/questions/46513981/how-to-display-an-iframe-by-clicking-a-button-javascript

https://www.tutorialrepublic.com/faq/how-to-detect-click-inside-iframe-using-javascript.php

https://stackoverflow.com/questions/2381336/detect-click-into-iframe-using-javascript

This is small solution that works in all browsers even IE8:

var elem = document.activeElement; ...

Categories

Recent posts