chromium/components/policy/resources/templates/policy_definitions/Miscellaneous/OffsetParentNewSpecBehaviorEnabled.yaml

caption: Control the new behavior of <ph name="OFFSET_PARENT">HTMLElement.offsetParent</ph>
default: null
deprecated: true
desc: |2-
  The <ph name="OFFSET_PARENT">HTMLElement.offsetParent</ph> API is being changed in <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> in order to comply with changes that have been made in <ph name="FIREFOX_PRODUCT_NAME">Firefox</ph> and <ph name="SAFARI_PRODUCT_NAME">Safari</ph>. This policy brings back the old behavior until M120.

  The new behavior may break some <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph>-only websites which use <ph name="OFFSET_PARENT">HTMLElement.offsetParent</ph>, <ph name="OFFSET_TOP">HTMLElement.offsetTop</ph>, or <ph name="OFFSET_LEFT">HTMLElement.offsetLeft</ph> in conjunction with Shadow DOM.

  Here are some polyfills which bring back the old behavior to help migrate https://github.com/josepharhar/offsetparent-polyfills

  If this policy is enabled, then the new behavior will be used.

  If this policy is disabled, then the old behavior will be used.

  If this policy is not set, then the new behavior will be used just like the rest of chromium users.
example_value: true
features:
  dynamic_refresh: true
  per_profile: true
items:
- caption: New offsetParent behavior will be used.
  value: true
- caption: Old offsetParent behavior will be used.
  value: false
- caption: New offsetParent behavior will be used by default.
  value: null
owners:
- [email protected]
- [email protected]
schema:
  type: boolean
supported_on:
- chrome.*:109-120
- chrome_os:109-120
- android:109-120
- webview_android:109-120
tags: []
type: main