📜 ⬆️ ⬇️

IE8b1 - check support generated content

Here are the test results for CSS2.1 generated content in IE8b1:
  1. if you set the generated content position: relative, IE8b1 has the current tab (a suggestion is displayed to start debugging in Visual Studio). Thanks to the innovation in IE8, which guarantees the restart of the hung tab, it starts up again, hangs again, and starts again. Endless cycle.
    code example:
    p:before {content: "test"; position: relative;}


    testcase

    ps be careful with the testcase - it really "hangs" IE8b1.

')
If the page does not have at least one of the IMG / OBJECT / IFRAME elements or the picture is not set in the background-image css property, then IE8b1 creates generated content after window.onload!
examples:
  1. There are no listed elements , the generated content is not created by the browser until the OK button is pressed, that is, after window.onload
  2. The generated content is created as it should be - before window.onload in cases where:
    an element in the CSS has a background image , an IMG element on the page,
    OBJECT or IFRAME



IE8b1 displays null instead of the value of the class attribute when using the following code:
p { content: attr(class); }

for the p element that has the class attribute value set.

However, if you write the rule as follows:
p { content: attr(className); }

Ie8b1 will correctly display the value of the class attribute.

Example


Of course, I can only guess, but these three bugs lead me to believe that the generated content in IE8b1 is generated by javascript, hidden from the user and running on a specific event. First, the debug suggestion in case of a hang on the css rule; secondly, that the generated content is created after window.onload in the absence of external resources (in any way indicated in the code); thirdly, that the value of the class attribute is read only by its DOM name.

Certainly in IE8b1 there is some event that the generated content support code runs on. It seemed to me because of bug # 2 - because in the case when the page does not refer to external data, we saw the creation of generated content after window.onload, when there is external data, the generated content has time to be created before window.onload has time start up
This is how it would be nice if we were given this event in Zhavascript, so that the garden wouldn’t have to be for IE. It would turn out full-fledged DomContentLoaded :)

Source: https://habr.com/ru/post/23147/


All Articles