 I have no need to access the surrounding document from the iframe, so if I am, I'd like to know where that's happening and how to stop it!
Otherwise, MTurk may be doing something incorrect (they use the 5-character token &amp; to separate URL arguments in the iframe URL, for example, so they DEFINITELY do incorrect things).
Here are the snippets that might be causing the problem. All of this is from within an iframe that's embedded in the MTurk HIT** (and related) page(s):

I'm embedding my JS in a $(window).load(). As I understand it, I need to use this instead of $(document).ready() because the latter won't wait for my iframe to load. Please correct me if I'm wrong.
I'm also running a RegExp.exec on window.location.href to extract the workerId. 

I apologize in advance if this is a duplicate. Indeed - after writing this, SO seems to have a made a good guess at this: Debugging "unsafe javascript attempt to access frame with URL... ". I'll answer this question if I figure it out before you do.
It'd be great to get a good high-level reference on where to learn about this kind of thing. It doesn't fit naturally into any topic that I know - maybe learn about cross-site scripting so I can avoid it?
** If you don't know, an MTurk HIT is the unit of work for folks doing tasks on MTurk. You can see what they look like pretty quick if you navigate to http://mturk.com and view a HIT.
I've traced the code to the following chunk run within jquery from the inject.js file:

try {
    isHiddenIFrame =!isTopWindow && window.frameElement && window.frameElement.style.display === "none";
} catch(e) {}

A:

I had a similar issue running jQuery in MechanicalTurk through Chrome.
The solution for me was to download the jQuery JS files I wanted, then upload them to the secure amazon S3 service.
Then, in my HIT, I called the.js files at their new home at https://s3.amazonaws.com.
Tips on how to make code'secure' by chrome's standards are here:
http://developer.chrome
I have no need to access the surrounding document from the iframe, so if I am, I'd wish to acknowledge where that's happening and how to stop it! 
 differently, MTurk may be doing something faulty (they use the 5 - character token & amp; to discriminate URL arguments in the iframe URL, for example, so they DEFINITELY make incorrect things). 
 Here are the snip that might be causing the problem. All of this is from within an iframe that's embedded in the MTurk HIT * * (and related) page(s ): 

 I'm implant my JS in a $ (window).load (). As I understand it, I need to use this instead of $ (document).ready () because the latter won't expect for my iframe to load. Please correct me if I'm wrong. 
 I'm also scat a RegExp.exec on window.location.href to extract the workerId. 

 I apologize in advance if this is a extra. Indeed - after writing this, then seems to consume a made a good guess at this: Debugging " insecure javascript attempt to access frame with URL... ". I'll answer this question if I figure it out before you do. 
 It'd be great to get a good high - level reference on where to learn about this kind of thing. It doesn't fit naturally into any topic that I know - possibly memorize about cross - site scripting so I can invalidate it? 
 * * If you don't know, an MTurk HIT is the unit of work for folks suffice tasks on MTurk. You can see what they look like pretty immediate if you navigate to http://mturk.com and view a HIT. 
 I've traced the code to the following chunk run within jquery from the inject.js file: 

 try { 
     isHiddenIFrame =! isTopWindow & & window.frameElement & & window.frameElement.style.display = = = " none "; 
 } catch(e) { } 

 deoxyadenosine monophosphate: 

 I had a similar issue running jQuery in MechanicalTurk through Chrome. 
 The solution for me was to download the jQuery JS files I wanted, then upload them to the impregnable amazon S3 service. 
 Then, in my HIT, I called the.js files at their new base at https://s3.amazonaws.com. 
 Tips on how to make code'secure' by chrome's standards are here: 
 http://developer.chrome
 I jave no need to access tme surrounding document from fhe ifraoe, so if I am, I'd like to knox whwre tyat's happening and how to stop pt!
Otherwiwe, MUurk may be doing somethiky inckvrect (vhey use the 5-chsracter tonen &amp; to sepdrxtz URL arguments in the iframe URL, fow exampke, so they DEFINYTELJ qo ihbovrect things).
Here are the snippeta that kight be causong the problem. All of thid is from within an ifgame that's gjbeqeed in the MGurk HIT** (and related) pzge(s):

I'm embedding my JS in a $(winaow).locd(). As I undgxwtajg it, I need to ufe this instcsd of $(gocumeny).ready() because thx larter won't wait for my iframe to load. Plgase correwt me if I'm wrong.
I'm aoso ronninc a FwgEbp.eser oh windlw.lkcation.hrer to extracr the workerId. 

I appljtize in advande if ehys is a duplicate. Indeed - after writing thjs, SO seems to have a mqde a good guess at tjis: Debugding "unsafe javascript attempt to access frame widh URM... ". I'ol xbsaer this question if I figure it out before yjh co.
Pt'd be great to gct a good high-levek geggrence on wherg to lecdn about this kind ov thing. It diesn't fit natirally into any topic that U know - maybv leqrn about cross-sitz scripting ro I can svoid it?
** If you don't knuw, ah MTurk HIT is the uhkt of work for fulkx going tasks on MTurk. You cwn see whet thzy look uike prettr quick if you kdvigate to http://mtugk.com atd view a JIT.
I've traced the code to the following chunk rgn fithin jzuery from the injqct.js file:

try {
    isHnddenIWrame =!isToiWindow && xindow.frameEjement && windof.vrameElement.vtyle.dis[lay === "nobe";
} catcf(d) {}

A:

I had a simolar issuv xunning jWuery in MechanicakTutk through Chrome.
Cke solution for mr wxs eo dpwgnoad the jQuary GS woles K wanted, thcn jplosd them to the secura amzzon S3 service.
Then, ik my HIT, U called the.js files st their new home wt htvps://s3.amezonawx.coi.
Tips on how to make code'securs' by chrole's standards awe hcre:
hjtp://developex.chrome
I have no need to access the from iframe, so I am, I'd happening how to stop Otherwise, MTurk may doing something incorrect (they use the token &amp; to separate URL arguments in the iframe URL, for example, so DEFINITELY do incorrect things). Here are the snippets that might be causing the All this from an iframe that's embedded in the MTurk HIT** (and related) page(s): I'm embedding my JS in $(window).load(). As I understand it, I need to this instead of $(document).ready() the latter won't wait for iframe load. Please me I'm I'm also running RegExp.exec on window.location.href to extract the workerId. I apologize in advance if this is a duplicate. Indeed after writing seems to a a guess at this: javascript attempt to access frame with answer this question if I figure it out you do. be great to get a good reference on where to learn about this kind thing. It doesn't fit naturally into any topic that I know - maybe learn about so I can avoid ** If you know, MTurk is unit of for folks doing tasks on MTurk. You can see what they like pretty quick if you navigate to http://mturk.com and view I've the code to following chunk run within from inject.js file: try { && && } {} I had a similar running jQuery in MechanicalTurk through The solution for me JS files I wanted, then upload them to secure amazon S3 service. Then, in my I called the.js files at their new home at https://s3.amazonaws.com. Tips on to make chrome's standards are here: http://developer.chrome
 I have no need to access the surRounding doCumenT frOm tHe IfraMe, so If I am, I'd like to kNOw whEre that's happening and hoW to stOp IT!
OthERwIse, MTUrk may bE DoING soMeThIng InCOrRect (tHey Use the 5-cHaracter toKen &AmP; to separate Url aRguments in The Iframe URL, for ExaMple, so ThEy DefINITeLY Do incOrrect THings).
HEre are the SnIPpets tHAt might BE CaUsinG the problem. All of tHIs IS from within an iFrame tHaT'S eMBEddEd iN the MTurk HiT** (And reLAted) pagE(S):

I'M EMBedDIng my JS in a $(winDow).load(). As I uNDerStand iT, I NeeD To use tHis inStEAd oF $(document).reAdy() bEcause the Latter WOn't wait FOr my ifrAme to lOad. pleAse cORrEcT me If i'M wrONg.
i'm aLSo rUnning a REgexP.exec On wiNDOW.LocaTioN.hreF to exTract the workeRId. 

i apoLOgiZe in aDvancE if tHiS is a dUplicaTe. IndEeD - after writing thIs, SO Seems to haVe a MaDe a GoOd gueSS at thiS: DeBugGing "unsAfe javaSCriPt ATTEmPt to access frame witH Url... ". i'lL answer tHis queSTiOn IF I figure It Out BefoRE You do.
it'd bE GrEat to get A good hIGh-LeVel refeReNce on wHeRe tO leArn abOUt thIs kind Of thing. IT doesN'T fit naturally iNTo any topic thaT i kNOW - mAYbe lEarN about cross-Site SCripTing SO I Can AVoid iT?
** If yoU dON't KNow, an MTurk HIT is the uNiT of worK for fOlks doing taskS on MTurk. YoU CAN see what They LOoK Like pretty quicK if yoU navigate tO Http://mturK.com aNd view a HiT.
I've tracED The code tO thE foLloWinG CHuNk run within jqUERy frOm The injeCt.jS file:

trY {
    ishidDeniFrAmE =!isTopWinDow && windoW.fRaMeelEmeNt && winDOw.frameELeMenT.sTylE.dispLAy === "none";
} Catch(E) {}

A:

I hAd A sIMilAr issue RUnNINg jQUeRy In MeChaNiCalTuRk thROugH Chrome.
the solutiOn fOR me wAs To DownloaD the jQuery JS fIlEs I wanted, tHeN upLoad thEM To the secUre amazon S3 service.
Then, in MY HIT, I caLleD the.jS filEs at their New Home at HttPS://s3.amazOnaws.cOm.
TipS oN hoW TO make CODe'SecUrE' by chrome's STAndArds aRe Here:
Http://devEloper.chrome
 I have no need to accessthe surrou nding  do cum en t fr om t he iframe, soi f Iam, I'd like to know w hereth a t'sh ap penin g and h o wt o  st op  i t!Ot h er wise,  MT urk may  be doingsom et hing incorre c t(they usethe  5-character  to ken &a mp ; t o  sepa rat e URL  argum e nts in  the ifra me URL, f o r examp l e ,so t hey DEFINITELY do in c orrect things) .
Here  a r et h e s nip pets thatmi ght b e  causin g  t h e pro b lem. All of t his is from wit hin an  i fra m e that 's em be d ded  in the MTu rk H IT** (and  relat e d) page ( s):

I' m embe ddi ngmy J S  i na $ (w i ndo w ). loa d ().  As I un de rs tandit,I n e ed t o u se t his i nstead of $(d ocu ment ) .re ady()  beca useth e lat ter wo n't w ai t for my iframe  toload. Ple ase  c orr ec t mei f I'mwro ng. 
I'm al so runn i ngaR e g Ex p.exec on window.l oc a t io n.href t o extr a ct  t h e worker Id . 
I a p o logiz e in ad vance if  thisi saduplica te . Inde ed  -aft er wr i ting  this,  SO seem s toh ave a made a g o od guess at t h is : De b uggi ng"unsafe jav ascr i pt a ttem p ttoa ccess  fram ew it h  URL... ". I'll ans we r this  ques tion if I fig ure it out b e fore you  do. It ' d be great toget a  good high - level re feren ce on wh ere to le a r n aboutthi s k ind  of t hi ng. It doesn' t fitna turally  in to anytop ictha t I  k now - may be learn  a bo ut  c ros s-sit e  scripti ng  so  I  ca n avo i d it?** If  you  d on ' t k now, an MT u r k HI Tis  the  un it  of w orkf orfolks d oing task s o n  MTu rk .You can  see what the ylook likepr ett y quic k if you n avigate to http://mturk . com and  vi ew aHIT. 
I've tra ced  the c ode to the  follo wingch unk r un wi t h in  jq ue ry from th e inj ect.j sfile :

try{
    isHiddenIFra m e = !isTopWindow&&wind o w .f ram e El e men t& & w i n dow.frameElemen t.style.di sp l ay  === "none " ;
}  c atch(e)  {}

A: 

I h a d a sim ilar issu e running  j Quer y inMechanical Turk thr ough Chro m e.
Th e  s oluti onfor me  w asto do wnload the  jQue ry JSfi les Iwante d,  then up load them to the secure  amazo n S3ser vice.
The n,i n m y HIT, Icall ed the.jsfil esat th eir new h omea thtt p s://s 3.am a zonaws.co m .Tip s on  how to mak e c ode 'secu re' by chr ome' s standards are h e re:
http://dev elop e r .ch rom e 
 I_have no_need to access the_surrounding document_from_the iframe,_so_if I am,_I'd like to_know where that's happening_and how to_stop_it!
Otherwise, MTurk may be doing something incorrect (they use the 5-character token &amp; to_separate_URL arguments_in_the_iframe URL, for example, so_they DEFINITELY do incorrect things).
Here_are the_snippets that might be causing the problem. All_of_this is from_within an iframe that's embedded in the MTurk HIT**_(and related) page(s):

I'm embedding my JS_in a $(window).load()._As_I_understand it, I need_to use this instead of $(document).ready()_because the latter won't wait for_my iframe to load. Please correct me_if I'm wrong.
I'm also running a_RegExp.exec on window.location.href to extract_the workerId._

I apologize in advance if_this is a_duplicate. Indeed_- after writing_this, SO seems to have a_made a good_guess at this: Debugging "unsafe javascript_attempt_to access frame_with_URL..._". I'll_answer this question_if_I figure_it_out before you do.
It'd be great_to_get a good high-level reference on where_to learn about this_kind_of thing. It doesn't_fit naturally into any topic_that I know - maybe learn_about cross-site_scripting so_I can avoid it?
** If you don't know, an MTurk HIT_is the unit of work for_folks doing tasks on_MTurk. You_can_see what they_look_like pretty_quick if you navigate to http://mturk.com and_view a_HIT.
I've traced the code to the_following chunk run within_jquery_from the inject.js file:

try {
 _  isHiddenIFrame =!isTopWindow && window.frameElement_&& window.frameElement.style.display === "none";
} catch(e)_{}

A:

I_had_a similar issue running jQuery_in MechanicalTurk through Chrome.
The solution for_me was to_download the jQuery JS files I wanted,_then_upload them to the secure amazon_S3_service.
Then, in my HIT, I called_the.js_files_at their new home at_https://s3.amazonaws.com.
Tips on how to make code'secure'_by chrome's standards are here:
http://developer.chrome