-
Notifications
You must be signed in to change notification settings - Fork 177
Web Components: Shadow Dom + Template Element #295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
101d05d
Implement template element.
futursolo 9a219ca
Implement slots.
futursolo 565702a
Implement ShadowRoot and attachShadow.
futursolo 4caadd6
Fix rust 1.24.1.
futursolo 20fdf31
Fix issues as per @koute 's review.
futursolo 4999960
Change return type of document.import_node from Node to Result<Node, …
futursolo 8fc80d8
Implement `ISlotable` for all structs that implements `IElement`.
futursolo ac6e269
Fix unittest.
futursolo dac5a85
Update enum values for SlotContentKind.
futursolo 66c7da6
Fix unittest.
futursolo 65c3a9d
Fix unittest(not sure what happened to stable build).
futursolo a43c36a
Remove IShadowRoot and implement ISlotable for <T: IElement>.
futursolo 60421be
Add an example for Web Components.
futursolo fdba46b
Fix unittest.
futursolo 29cf77d
Fix unittest.
futursolo 53b8d0a
Fix unittest.
futursolo f3fd313
Fix unittest.
futursolo 37bab1d
Add backtrace to see what's going on.
futursolo 7ec158b
Fix unittest and example.
futursolo af5421f
Comment out `assigned_elements` from `test_shadow_dom`.
futursolo 73b075b
Finish things up.
futursolo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
|
@@ -3,6 +3,8 @@ | |
set -euo pipefail | ||
IFS=$'\n\t' | ||
|
||
export RUST_BACKTRACE=1 | ||
|
||
CARGO_WEB=${CARGO_WEB:-cargo-web} | ||
|
||
set +e | ||
|
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -8,3 +8,4 @@ pub mod mouse; | |
pub mod pointer; | ||
pub mod progress; | ||
pub mod socket; | ||
pub mod slot; |
This file contains hidden or 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,15 @@ | ||
use webcore::value::Reference; | ||
use webapi::event::{IEvent, Event}; | ||
|
||
/// The `slotchange` event is fired on an HTMLSlotElement instance | ||
/// (`<slot>` element) when the node(s) contained in that slot change. | ||
/// | ||
/// [(JavaScript docs)](https://developer.mozilla.org/en-US/docs/Web/Events/slotchange) | ||
// https://dom.spec.whatwg.org/#mutation-observers | ||
#[derive(Clone, Debug, PartialEq, Eq, ReferenceType)] | ||
futursolo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
#[reference(instance_of = "Event")] | ||
#[reference(event = "slotchange")] | ||
#[reference(subclass_of(Event))] | ||
pub struct SlotChangeEvent( Reference ); | ||
|
||
impl IEvent for SlotChangeEvent {} |
This file contains hidden or 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 hidden or 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 |
---|---|---|
|
@@ -39,4 +39,4 @@ impl OptionElement { | |
return @{self}.value; | ||
).try_into().unwrap() | ||
} | ||
} | ||
} |
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.