GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — onbeforeunload章节中已过时的警告提示信息 · Issue #1219 · javascript-tutorial/zh.javascript.info

onbeforeunload章节中已过时的警告提示信息 #1219

New issue
Copy link
New issue
Copy link
Open
Open
onbeforeunload章节中已过时的警告提示信息#1219
Copy link

Description

@imnotananga
imnotananga
opened on Aug 8, 2024
Issue body actions

位置:
https://zh.javascript.info/onload-ondomcontentloaded#window.onbeforeunload

event.preventDefault() 在 beforeunload 处理程序中不起作用 这一部分的警告提示信息已过时
经测试,event.preventDefault()是正常起作用的,查看了下俄文原版教程,这一段内容也已经删除了

截屏2024-08-08 14 59 00

测试环境:
Chromium Engine Version 127.0.6533.89
Safari 版本17.5 (19618.2.12.11.6)

建议:
同步删除该部分内容

Activity

  1. GeoDaoyu commented on Nov 17, 2025

    @GeoDaoyu
    GeoDaoyu
    on Nov 17, 2025
    Contributor
    More actions

    我看英文原版还是有这块内容
    https://javascript.info/onload-ondomcontentloaded#window.onbeforeunload

  2. imnotananga commented on Nov 24, 2025

    @imnotananga
    imnotananga
    on Nov 24, 2025
    Author
    More actions

    英文原版教程中的确还有这部分内容,我以前误以为俄文版是原版,刚看了下俄文版其实是翻译版,可能翻译的时候没有补充这块。
    不过我又尝试了下,event.preventDefault()依然是有效的,感觉是现代浏览器为了兼容已经支持了。

  3. GeoDaoyu commented on Nov 24, 2025

    @GeoDaoyu
    GeoDaoyu
    on Nov 24, 2025
    Contributor
    More actions

    要不然先给 https://github.com/javascript-tutorial/en.javascript.info/issues 提issue,然后中文版这边再同步?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.