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 8232145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:43:58+00:00 2026-06-07T17:43:58+00:00

I am making a clone of a DOM Range using cloneRange() function. If I

  • 0

I am making a clone of a DOM Range using cloneRange() function. If I then modify the original range object like this:

range.setStart(range.startContainer, 1);

The clone preserves the old startOffset as expected.

However, if I modify the DOM tree, then the clone’s startOffset will also get affected. Is there an intentional internal wiring between the DOM tree and all ranges that are associated with it (clones included)?

JS Fiddle Example

  • 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-07T17:44:00+00:00Added an answer on June 7, 2026 at 5:44 pm

    Yes, there is. What happens to ranges under DOM mutation is specified in the DOM Level 2 Range specification. The more recent DOM4 Range specification specifies this under the mutation algorithms section (thanks to RobG for pointing that out).

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

Sidebar

Related Questions

I am making a copy of my object by using clone() method. But when
I am making a Pong clone and I am treating my variables in this
I have an animated Brush object and i want to Clone this brush. ColorAnimation
I'm making another Pong clone using HTML5 canvas and JavaScript. The problem I'm having
I'm writing a Clone function for a non serializeable object.For most objects I don't
I'm making a little Tetris clone using some of the HTML 5 features, and
I keep making attempts at properly using HTML5 but I feel like it's still
Scenario : I am making a clone of a popular card game. There needs
I'm making a Tetris Clone in C# with XNA, and I'm unsure of how
I've been exercising my skills by making a Space Invaders clone. I asked a

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.