Safari testcase | Document.selectedStylesheetSet property access

When creating an empty Document object, Safari crashes on the selectedStylesheetSet property. You only need to run the 4th test-script, to reproduce the behaviour.

OK. This script work in Safari 1.0 (v85.5)

function ()
{
  if(document.implementation&&document.implementation.createDocument)
  {
    var xmlDoc=document.implementation.createDocument('','',null);
    var a=[];
    for(var i in xmlDoc)
    {
      a[a.length]=i; 
    }
    alert(a.join(' | '));
  }
}

CRASH: This script should crash Safari 1.0 (v85.5).

function ()
{
  if(document.implementation&&document.implementation.createDocument)
  {
    var xmlDoc=document.implementation.createDocument('','',null);
    var a=[];
    for(var i in xmlDoc)
    {
      var itm=xmlDoc[i];
    }
  }
}

CRASH: Test if Safari crashes on specific property access.

function ()
{
  if(document.implementation&&document.implementation.createDocument)
  {
    var xmlDoc=document.implementation.createDocument('','',null);
    var a=[];
    for(var i in xmlDoc)
    {
      if(!confirm('Going to access property ['+i+']. Press Cancel to stop the loop.'))
        break;
      var itm=xmlDoc[i];
    }
  }
}

CRASH: Test if Safari crashes on selectedStylesheetSet-property access.

function ()
{
  if(document.implementation&&document.implementation.createDocument)
  {
    var xmlDoc=document.implementation.createDocument('','',null);
    var itm=xmlDoc.selectedStylesheetSet;
  }
}


Back to the bugs