Commit Graph
2 Commits
Author SHA1 Message Date
David Richardson 49e0407ef4 CPCompatibility: Return nil for style properties without a DOM
CPBrowserStyleProperty created a test element without checking for a DOM,
throwing a ReferenceError outside a browser. Because initializing an
animator proxy calls this function, -animator could not be used in the
test suite. CPBrowserStyleProperty now returns nil when no DOM is
available.
2026-11-23 17:20:18 -06:00
David Richardson f1a8b154fc AppKit: Fix CPDOMAvailable read before assignment
CPDOMAvailable was read during load before it was assigned.

* CPCompatibility: Move the CPDOMAvailable assignment ahead of the engine detection, whose AppleWebKit case calls +[CPPlatform isBrowser], which reads it.
* CPCompatibilityTest: Add a test that re-executes CPCompatibility.j with an AppleWebKit user agent and CPDOMAvailable unset, failing on any exception.
2026-10-15 09:26:12 -06:00