YUI 之getLocation

關於Y.getLocation的簡介是jquery

Returns the `location` object from the window/frame in which this YUI instance operates, or `undefined` when executing in a non-browser environmentweb

意思就是從window/frame中的YUI實例運行時,或者沒有瀏覽器環境下,返回一個Location對象,緣由是低版本的chrome和safafi會有一個Bug存在chrome

[WebKit Bug 34679](https://bugs.webkit.org/show_bug.cgi?id=34679)瀏覽器

當你在一個dom

location

當咱們再隨意點擊一個連接後,經過後退再次返回這個函數所存在的頁面時,在safari(5.1.7)中,前兩個變成了undefined,函數

測試地址http://benalman.com/code/projects/jquery-hashchange/examples/bug-safari-back-from-diff-domain/oop

 

YUI的解決方案測試

location
相關文章
相關標籤/搜索