Use Javascript to get selected text in Mobile Safari

后端 未结 3 1385
生来不讨喜
生来不讨喜 2021-02-07 19:50

So I\'m working on a bookmarklet where it would be ideal for me to grab the content selected by the user using the \"loop\". Both window.getSelection and document.getSelection a

3条回答
  •  名媛妹妹
    2021-02-07 20:49

    The contents of the "loop" are not exposed to javascript in the mobile browser, period. So this is impossible (I am assuming that you are working in the full browser, not in the browser window created when you launch a "saved to home page" icon)

提交回复
热议问题