Skip to content

Allow choosing the box model in Node::getPosition() method#726

Open
aprat84 wants to merge 2 commits into
chrome-php:1.15from
aprat84:dom-node-position-box-model
Open

Allow choosing the box model in Node::getPosition() method#726
aprat84 wants to merge 2 commits into
chrome-php:1.15from
aprat84:dom-node-position-box-model

Conversation

@aprat84

@aprat84 aprat84 commented Jun 18, 2026

Copy link
Copy Markdown

When rendering single page documents, this method would be so handy, but it only measures the content-box, so the element padding is omitted.

For this task, and potentially other tasks, it would be useful to be able to chose the box model.

Default to content, so it is backwards compatible!

PD: Ideally, a getBodModel method could be added, deprecating the getPosition, and return measures for every box model the devtools API returns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant