-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store original device layout was scraped with (#1474)
* Add device parameter to element constructor * Replace `box` property by `boxes: Cache<Device, Rectangle>` * Add dependency alfa-dom -> alfa-device to package.json * Add device to tests using box * Extract API * Add unlisted dependency * Add dependency in tsconfig too * Add `OPTIONS` type parameter to `Serializable` interface * Add serialization options * Extract API * Clean up * Add changesets * Update .changeset/chilled-laws-hammer.md Co-authored-by: Jean-Yves Moyen <[email protected]> * Update packages/alfa-dom/src/node.ts Co-authored-by: Jean-Yves Moyen <[email protected]> * Remove placeholder function * Removed unused imports and dependencies * Remove package the right way * Extract API * Update yarn.lock * Revert yarn.lock update * Revert all changes to *.api.md as something seems to have gone wrong * Extract API --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Jean-Yves Moyen <[email protected]>
- Loading branch information
1 parent
831e7ff
commit 6231b55
Showing
38 changed files
with
346 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@siteimprove/alfa-style": minor | ||
--- | ||
|
||
**Breaking:** Function `getBoundingBox` was removed. | ||
|
||
Use `Element#getBoundingBox` instead. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@siteimprove/alfa-json": minor | ||
--- | ||
|
||
**Added:** `Serializable` interface now optionally accepts serialization options. | ||
|
||
When implementing the interface a type parameter can be supplied and `toJSON` can optionally take an object of that type that can be used for changing the serialization behavior. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@siteimprove/alfa-dom": minor | ||
--- | ||
|
||
**Breaking:** `Element#of` now requires the device used when scraping a page in order to store a box. | ||
|
||
This ensures that the boxes of the elements will be stored with and only be accessible for the same device instance. If no device is provided, no box is stored with the element. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@siteimprove/alfa-tree": minor | ||
--- | ||
|
||
**Added:** Optional serialization options type parameter added to abstract `Node` class. | ||
|
||
This is passed to the `Serializable` interface to allow implementers to supply the serialization options type. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@siteimprove/alfa-dom": minor | ||
--- | ||
|
||
**Added:** `Document#toJSON` now optionally accepts serialization options containing device. | ||
|
||
The options will be passed down to all children of the document and used by `Element` to serialize the box corresponding to the device. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.