mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-27 03:55:20 +03:00
Add missing indexing words
This commit is contained in:
parent
f54d51e045
commit
86b5ba6431
@ -1881,9 +1881,9 @@ impl<'a, 'b> SubContext<'a, 'b> {
|
||||
class, location, s,
|
||||
)
|
||||
}
|
||||
shared::OperationKind::IndexingGetter => panic!("getter should be structural"),
|
||||
shared::OperationKind::IndexingSetter => panic!("setter should be structural"),
|
||||
shared::OperationKind::IndexingDeleter => panic!("deleter should be structural"),
|
||||
shared::OperationKind::IndexingGetter => panic!("indexing getter should be structural"),
|
||||
shared::OperationKind::IndexingSetter => panic!("indexing setter should be structural"),
|
||||
shared::OperationKind::IndexingDeleter => panic!("indexing deleter should be structural"),
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -973,9 +973,9 @@ impl<'src> FirstPassRecord<'src> {
|
||||
mdn_doc(self_name, Some(&name))
|
||||
)
|
||||
),
|
||||
::first_pass::OperationId::IndexingGetter => Some("The getter\n\n".to_string()),
|
||||
::first_pass::OperationId::IndexingSetter => Some("The setter\n\n".to_string()),
|
||||
::first_pass::OperationId::IndexingDeleter => Some("The deleter\n\n".to_string()),
|
||||
::first_pass::OperationId::IndexingGetter => Some("The indexing getter\n\n".to_string()),
|
||||
::first_pass::OperationId::IndexingSetter => Some("The indexing setter\n\n".to_string()),
|
||||
::first_pass::OperationId::IndexingDeleter => Some("The indexing deleter\n\n".to_string()),
|
||||
};
|
||||
|
||||
self.create_function(
|
||||
|
@ -129,13 +129,14 @@ possibilities!
|
||||
an object we can use the `structural` flag.
|
||||
|
||||
* `indexing_getter`, `indexing_setter` and `indexing_deleter` - these three
|
||||
attributes can be combined with `method` to indicate that this is a getter,
|
||||
setter or deleter method. They are different from `getter` and `setter` in a
|
||||
way that `getter` and `setter` can only access properties that have a name
|
||||
corresponding to the function name or their argument, but `indexing_getter`,
|
||||
`indexing_setter` and `indexing_deleter` work in a dynamic manner, similarly
|
||||
to the indexing syntax in JS (`object[propertyName]`), hence the name. Should
|
||||
always be used together with the `structural` flag. For example:
|
||||
attributes can be combined with `method` to indicate that this is a indexing
|
||||
getter, indexing setter or indexing deleter method. They are different from
|
||||
`getter` and `setter` in a way that `getter` and `setter` can only access
|
||||
properties that have a name corresponding to the function name or their
|
||||
argument, but `indexing_getter`, `indexing_setter` and `indexing_deleter`
|
||||
work in a dynamic manner, similarly to the indexing syntax in JS
|
||||
(`object[propertyName]`), hence the name. Should always be used together with
|
||||
the `structural` flag. For example:
|
||||
|
||||
```rust
|
||||
#[wasm_bindgen]
|
||||
|
Loading…
Reference in New Issue
Block a user