[{"data":1,"prerenderedAt":264},["ShallowReactive",2],{"project-14041400":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":41,"post_text":42,"what":43,"said":77,"maker_in_thread":169,"shape":181,"grid":185,"attempts":228,"same_week":229,"maker_shows":33,"maker_hidden":256,"reader_version":257,"card":258},"14041400","AcrossTabs","Easy communication between cross-origin browser tabs","title","Show HN: AcrossTabs – Easy communication between cross-origin browser tabs","https:\u002F\u002Fgithub.com\u002Fwingify\u002Facross-tabs","github.com","softvar",1491393512,2017,107,25,428,2242,20,"notable","languages","javascript library","library",[24,25,26,27],"cross-origin messaging","browser tabs","postmessage","cross-tab communication","mixed",-0.034,{"positive":31,"neutral":32,"mixed":33,"critical":34},3,8,1,5,17,{"privacy":37,"idea":40},{"positive":38,"critical":39},0,4,{"positive":31,"critical":33},[31,38,33,38,31,33,33,33,38,31,31,31,31,31,31,34,38,31,38,38,33,38,34,34,38],null,{"problem":44,"audience":53,"pricing":42,"motivation":62,"time_to_build":42,"stack":66,"openness":74,"stage":75,"team_size":76},{"value":45,"source":46,"evidence":47},"Lets browser tabs on different origins send messages to each other and track each other's status","maker",[48,51],{"id":49,"by":11,"text":50},"14042469","Yes, there are many. I'm a developer at Wingify, an A\u002FB Testing tool and we are using this library I created a few days back. We have something called heatmaps -…",{"id":52},"post",{"value":54,"source":55,"evidence":56},"Web developers building browser-based apps that open and control other tabs","inferred",[57,61],{"id":58,"by":59,"text":60},"14041872","onion2k","If you build browser-based applications that open websites in new tabs and programatically interact with them then I imagine it'd be handy. I'm making a test builder to generate…",{"id":49,"by":11,"text":50},{"value":63,"source":46,"evidence":64},"Built at Wingify for heatmap views and previews of site changes in new tabs",[65],{"id":49,"by":11,"text":50},[67],{"value":68,"source":55,"evidence":69},"JavaScript",[70],{"id":71,"by":72,"text":73},"14041528","mnarayan01","Looks like a nice library, though using a default of `*` for Origin seems like an invitation for people to shoot themselves in the foot.","open_source","launched","company",{"praise":78,"objections":94,"requests":118,"questions":141,"alternatives":149},[79,87],{"value":80,"source":81,"evidence":82},"Useful for iframe and tab communication patterns","commenter",[83],{"id":84,"by":85,"text":86},"14042006","ggaahh","This is great. I found this pattern very useful when communicating with iframes. I wrote a similar library a while back. https:\u002F\u002Fgithub.com\u002Ftaylorhakes\u002Fpostmessage-plus",{"value":88,"source":81,"evidence":89},"Saves time versus building a similar library",[90],{"id":91,"by":92,"text":93},"14042061","ssalka","I had something very similar to this in my backlog, as a weekend project. Glad to see someone else beat me to it - saves me time in both implementation and maintenance! I look…",[95,107],{"value":96,"source":81,"evidence":97},"Default origin of * is unsafe and invites security mistakes",[98,99,103],{"id":71,"by":72,"text":73},{"id":100,"by":101,"text":102},"14041597","detaro","Then don't have a default that works without doing so. Really, defaults like this lead to \"works, ship it\" and totally unnecessary cases of vulnerable software.",{"id":104,"by":105,"text":106},"14042277","deadbunny","Don't use unsafe defaults ffs, that's how things get exploited.",{"value":108,"source":81,"evidence":109},"Cross-tab communication is a security risk if receivers do not check origin",[110,114],{"id":111,"by":112,"text":113},"14041478","tiplus","I was puzzled when I first saw cross tab communication in impress.js for their slide control tab (slid.es) and I am still wondering about the proper use case of this feature…",{"id":115,"by":116,"text":117},"14041581","tyingq","It maps back to window.postMessage. There's a security concerns section on Mozilla's docs: https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FAPI\u002FWindow\u002FpostMessage All boils down the…",[119,130],{"value":120,"source":81,"evidence":121},"Make origin a required parameter instead of defaulting to *",[122,126],{"id":123,"by":124,"text":125},"14045119","tokenizerrr","Yes, a required argument. It's not uncommon. Think API keys.",{"id":127,"by":128,"text":129},"14046649","Karupan","Second this. A lot of developers will just drop it in without reading the caveats. Just make the origin a mandatory parameter.",{"value":131,"source":81,"evidence":132},"Put wildcard origin behind a long-named setter or default to current domain",[133,137],{"id":134,"by":135,"text":136},"14043384","cryptarch","Put the wildcard functionality behind a setter with a long name and make the default the current domain?",{"id":138,"by":139,"text":140},"14044375","Bartkusa","Put it behind a setter with \"doNotUseOrYouWillBeFired\" in the function name.…",[142],{"value":143,"source":81,"evidence":144},"What real-world use cases does this solve?",[145],{"id":146,"by":147,"text":148},"14041736","martin-adams","I think I understand what this does, but I don't think I understand the use case. Does anyone have any real-world examples of where this helps?",[150,161,165],{"value":151,"source":81,"evidence":152},"BroadcastChannel API (same origin only)",[153,157],{"id":154,"by":155,"text":156},"14043117","zspitzer","Chrome and Firefox support BroadcastChannel https:\u002F\u002Fdevelopers.google.com\u002Fweb\u002Fupdates\u002F2016\u002F09\u002Fbroadcastchannel https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FAPI\u002FBroadcastChannel",{"id":158,"by":159,"text":160},"14043497","gauravmuk","this works for same origin only.",{"value":162,"source":81,"evidence":163},"window.postMessage",[164],{"id":115,"by":116,"text":117},{"value":166,"source":81,"evidence":167},"postmessage-plus",[168],{"id":84,"by":85,"text":86},{"comments":170,"answered":33,"key":171},6,[172,175,178],{"id":173,"text":174},"14041569","Yea, that's totally true. I would recommend using an origin property to be used every time an instance of the Library is created. Please refer:…",{"id":176,"text":177},"14042615","Does that mean, the library should not act when an origin is not specified and throw some kinda message in the console?",{"id":179,"text":180},"14042608","Does that mean, the library should not act when an origin is not specified and throw some kinda message in the console? How can it be enforced? Any suggestions? Users can also…",{"commenters":182,"max_depth":170,"maker_replies":170,"first_comment_mins":183,"lifespan_hours":184},19,16,12,[186,188,190,192,193,194,197,198,199,200,201,202,203,204,207,210,212,214,217,220,221,223,224,225,226],[71,38,31,187,72,38],"project\u002Fmixed\u002Fprivacy",[173,38,38,189,11,33],"project\u002Fneutral\u002Fprivacy",[100,38,33,191,101,38],"project\u002Fcritical\u002Fprivacy",[176,38,38,189,11,33],[123,38,31,189,124,38],[195,38,33,191,196,38],"14042687","fdim",[127,38,33,191,128,38],[104,38,33,191,105,38],[179,38,38,189,11,33],[134,38,31,189,135,38],[138,38,31,189,139,38],[111,33,31,189,112,38],[115,33,31,189,116,38],[205,33,31,189,206,38],"14043125","d--b",[146,208,31,209,147,38],2,"project\u002Fneutral\u002Fidea",[58,208,34,211,59,38],"project\u002Fpositive\u002Fidea",[213,208,38,209,11,33],"14042505",[215,208,31,209,216,38],"14041913","seibelj",[218,208,38,219,124,38],"14045142","commenter\u002Fneutral\u002Fnone",[49,208,38,209,11,33],[154,31,33,222,155,38],"project\u002Fcritical\u002Fidea",[158,31,38,219,159,38],[84,39,34,211,85,38],[91,34,34,211,92,38],[227,34,38,219,11,33],"14042356",[],[230,235,239,243,247,252],{"id":231,"name":232,"points":233,"category":234},"14032201","React-data sheet",345,"dev_tools",{"id":236,"name":237,"points":238,"category":234},"14023196","Is It Snappy?",293,{"id":240,"name":241,"points":242,"category":20},"13995891","Redux Offline",174,{"id":244,"name":245,"points":246,"category":234},"14022059","develmail",149,{"id":248,"name":249,"points":250,"category":251},"14007257","Interactive ClojureScript book",134,"learning_science",{"id":253,"name":254,"points":255,"category":251},"14043519","Robotopia",133,false,"v2",{"id":259,"name":5,"line":6,"ai":256,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":260,"top":18,"kw":261,"maker":11,"domain":10,"tier":19,"attempts":38,"strip":262,"url":9,"mix":263,"praise":80,"objection":96,"sub":21},14041400,-0.03,[24,25,26,27],"3010311103333335030010550",[31,32,33,34],1793990957389]