self.origin returns the Unicode serialization of the origin of the settings object of the global represented by "self" (a Window or WorkerGlobalScope). This gives scripts a consistent way of getting their origin in both situations. Note that unlike location.origin this represents the actual origin of the global, not the origin of the URL it's loaded from. The difference can be substantial in the case of sandboxing, for example.


Established standard

Status in Chromium


In development (tracking bug)

Consensus & Standardization

  • In development
  • No public signals
  • No public signals
  • No signals


Last updated on 2017-06-14