Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8445669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:42:57+00:00 2026-06-10T09:42:57+00:00

According to this MDN page , the delete keyword Returns false only if the

  • 0

According to this MDN page, the delete keyword

Returns false only if the property exists and cannot be deleted. It
returns true in all other cases.

However, I see cases where delete returns true, despite the property not being deleted:

delete Window
delete alert
delete dir
delete console
delete 2
delete null
delete {}.x
...

In fact, almost all properties of window return true with delete, as can be seen by the running the following script in about:blank:

for(a in window) { if(delete window[a]) { console.log(a); } }

However, most properties of window do not actually get deleted. What is the true meaning of the returned value of delete? Why does it return true for properties it doesn’t delete?

(Note: I would be interested in references to Chromium code explaining the behaviour of delete.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T09:42:58+00:00Added an answer on June 10, 2026 at 9:42 am

    The window is a host object, one whose semantics are defined by the host environment, e.g. the browser. delete when applied to properties of host objects is more complicated than when applied to native objects.

    Host objects may support these internal properties with any implementation-dependent behaviour as long as it is consistent with the specific host object restrictions stated in this document.

    Section 11.4.1 – The delete operator says

    If IsUnresolvableReference(ref) then,
      If IsStrictReference(ref) is true, throw a SyntaxError exception.
      Else, return true.
    

    so when a host object doesn’t support deletion or modification of a property, then it returns an unresolvable reference or a reference which pretends to be deleted. Either approach causes true to be returned in non-strict mode.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to this forum , SSIS only supports UTF-16 Little Endian flat files. Is
There is HTML page with contents like this. Documentation at MDN says that childNodes
According to this page , there are sample Apps that show how to use
According to this: http://code.google.com/appengine/docs/whatisgoogleappengine.html it seems that GAE only uses Datastore to store data,
According to this page you can implicitly convert shared_ptr<Foo> to shared_ptr<const Foo> . That
According to this answer ,it should print all function names: [root@ test]# cat hw.c
According to this page navigating between highlighted usages: (source: jetbrains.com ) can be done
According to this page: http://jqueryui.com/demos/tabs/#ajax I can have the content of tabs in separate
According to this answer : HTML 4.01 specifies that <a> elements may only contain
According to this page, it's possible to use TClientDataset as an in-memory dataset, completely

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.