Sharovatov’s Weblog

IE8b1 generated content support

Posted in browsers, css, javascript by sharovatov on 8 April 2008

I've tested generated content model in IE8b1 quite thoroughly, have found quite weird bugs and here's what I've come up with:

  1. First bug I've noticed was happening when you set position: relative for the generated content rule. The tab where you have this page opened dies. And then due to newly introduced crash recovery system, it tries to recover the tab, loads the page and dies again and so on — an infinite loop that you can't break. But the weird thing is that it doesn't actually die — it shows a window promting to select a debugger. The kind of window that appears when you have errors in your javascript code.

    here's the code sample:

    p:before {content: "test"; position: relative;}

    and the testcase.

  2. I noted the bug and continued testing.

    Next thing I came up with was the fact that if the page doesn't have IMG/OBJECT/IFRAME elements or an image set as a background for an element, generated content is created after window.onload!

    Please have a look on the following testcases:

    1. Document contains None of the elements listed above, and generated content is not being generated till you press OK. It means that generated content is created after window.onload occurred!
    2. Generated content is created before window.onload as it should be in the following cases:
      an element has CSS background-image rule set, or page includes one of the elements: IMG,
      OBJECT or an IFRAME

    At this point I thought — wait — it's strange — all CSS rules were always applied before window.onload! Anyway, I just went on testing.

  3. And then there was another strange thing — when you use content: attr(class), IE8b1 doesn't show the attribute value but shows null instead. But if you set the rule as content: attr(className), it actually shows the attribute value!

    Here's the testcase for this bug.

  4. And another interesting thing is that expression doesn't work in generated content rules.

    Please see the testcase.

Of course I can only guess but my feeling is that IE8b1 doesn't have proper support for the generated content, it's rather done by a hook somewhere firing off the function that generates the content. All these four bugs have something in common — debug window (that's usually shown for javascript errors); generating content after window.onload in some cases; reading class attribute value by its DOM name (className). Basically it's all about javascript.

And I can't help thinking that IE8b1 uses some hidden javascript code to support generated content. And this functionality is triggered by some hidden event like DomContentLoaded.

And if so I would be really happy if they could give us access to this handler :)

2 Responses

Subscribe to comments with RSS.

  1. […] about bugs that I blogged about here and […]

  2. webpage said, on 30 September 2013 at 7:43 pm

    This piece of writing gives clear idea in favor of the new people of
    blogging, that really how to do running a blog.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: