This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
O(1) - Trivial, we've done something almost exactly like this and it wont take long to complete at all | |
O(log n) - Need to add a small capability then it's copy-pasta | |
O(n) - Simple, It's like things we've done before. No refactoring or architectural changes needed. | |
O(n^2) - Going to need to rework some things and watch out for regressions | |
O(n!) - Major rework needed, lots of risk | |
O(MG) - This is so complex or ill-defined that it may never complete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Demo: http://jsfiddle.net/pFaSx/ | |
// Create an invisible iframe | |
var iframe = document.createElement('iframe'); | |
iframe.id = "hacky-scrollbar-resize-listener"; | |
iframe.style.cssText = 'height: 0; background-color: transparent; margin: 0; padding: 0; overflow: hidden; border-width: 0; position: absolute; width: 100%;'; | |
// Register our event when the iframe loads | |
iframe.onload = function() { | |
// The trick here is that because this iframe has 100% width |