We have a site that is completely superseded by knockout, and we need to support all major browsers, including Internet Explorer, in IE7 (not IE6).
Chrome already supports almost all the HTML 5 features that we really care about, and Modernizr treats CSS hacks like a champion. But there are times when we still need to resort to poly-regiments, two noteworthy examples are an attribute placeholder, and recently an element <details>.
Most poly regiments either rely on jQuery plugins, which is theoretically great. Unfortunately, they also tend to be ineffective when working with dynamically loaded content - which has a ton when you use knockout (or any template mechanism). A further complication is that we use knockout as a true MVVM, so there is no decent place for shoehorn in a bunch of JS hacks to reload plugins (which is probably good for our architecture, but it frustrates this from the front).
We were able to come up with a semi-reliable implementation using the event DOMNodeInserted(deprecated, I know) for Firefox and IE9. Unfortunately, it did not work in IE8 because outdated IE does not support it , and it seems almost impossible to reproduce in these browsers. onreadystatechangeIt seemed promising at first, but the event, as a rule, is triggered too early, even if it is readyStateclearly verified - and the policies do not miss their goals, so to speak.
The only option we tried to do, really working reliably in IE7 / IE8, was to use a re-timeout to re-run poly-regiments every 50 ms. Unfortunately, this also constantly consumed the entire processor, and a load of up to 100 ms caused a too noticeable delay in the user interface, so it is not suitable for use as a source.
So: Is there any reliable way to combine traditional polyfill methods with dynamic content and patterns, such as knockoutjs, that works in all major browsers, at least until IE7?
(FWIW, , afterRender, "poly" "polyfill". , , .)