JSFiddle wrap in onLoad?

前端 未结 3 1406
无人及你
无人及你 2020-12-17 01:01

I\'m trying to understand how JSFiddle \'wraps\' code in \'onLoad\' based on this description: [1]: http://doc.jsfiddle.net/basic/introduction.html#javascript. I\'ve seen on

3条回答
  •  一整个雨季
    2020-12-17 01:18

    They put all your JS inside

    If you don't include a library then they use:

    
    

    I presume they also use other library specific load events depending on what you choose to include.

    Using $(document).ready(function(){ }); isn't required when running your code in a fiddle.

    Note: for a good explanation of what CDATA is take a look at this answer - https://stackoverflow.com/a/7092306/2287470

提交回复
热议问题