sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Two JavaScript Points

    Scheduled Pinned Locked Moved Developers' Forum
    2 Posts 2 Posters 213 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      MartinRinehart
      last edited by MartinRinehart

      1. Hereabouts I once said that window.event is the same as event in a browser, because window is the global object. That was almost right.

      This will get a cross-browser event:

      onSomeEvent( e ) {
      e = e || event;
      
      

      MSIE, and I don't have it pinned down yet, sometimes insists on the window. prefix. I've started to routinely include window. even though it looks pretty dumb.

      1. Pop Quiz!
      
      var arr = [1,2,3,4,5];
      for ( elem in arr ) { alert(elem); }
      
      

      What is the first elem?

      Dan, if you know the answer, please be a little slow to post it.

      Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

      1 Reply Last reply Reply Quote 0
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        @martinrinehart said:

        Dan, if you know the answer, please be a little slow to post it.

        .. yuz callin' me Slow, cuz'n ?? 😛

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement