Detecting load of <link> resources?

前端 未结 1 615
梦如初夏
梦如初夏 2021-01-05 16:14

Browsers provide load events for

1条回答
  •  失恋的感觉
    2021-01-05 16:59

    There may be a simpler way to do it, but this worked for me.

    Make sure your tag has a title attribute:

    
    

    Then use a function like this to check for the presence of a style within a particular styleseet:

    function linkLoaded(linkTitle, checkStyle)
    {
        for (var ix=0; ix

    0 讨论(0)
提交回复
热议问题