![]() But you'll come across a " refused to connect" once in a while. Var x = window.open(location, "_blank", "toolbar=no,menubar=no,scrollbars=yes,dialog=yes,resizable=no,top=100,left=250,width=800,height=530") Why do we first open using the current URL? So we can manipulate the DOM without being annoyed with these "Blocked a frame with origin "." from accessing a cross-origin frame" errors, and also so that we can attach the resize event listener to the window (not possible with the original solution). The following solution creates a new window using the current URL, then overwrites the document with an containing the source of the desired site. ![]() on a window with a different origin as it can be used for malicious purposes. This is not a cross-origin solution - you cannot add event listeners etc. By listening for the window resize event and using the Window.resizeTo() function, it is possible to prevent the window from resizing.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |