Commit baa48c9
committed
WebIDL binder: Added 'BindTo' extended attribute
This attribute can be used to change the C++ function that will be called. It can be used expose functions that have multiple overloads with the same number of parameters:
Example C++ code:
class BindToTest {
public:
int test(const char*) { return 1; }
int test(int) { return 2; }
};
IDL:
interface BindToTest {
void BindToTest();
[BindTo="test"] long testString([Const] DOMString arg);
[BindTo="test"] long testInt(long arg);
};
Now the two overloaded functions can be called from JavaScript.1 parent b53978e commit baa48c9
File tree
9 files changed
+80
-5
lines changed- site/source/docs/porting/connecting_cpp_and_javascript
- test/webidl
- third_party
- tools
9 files changed
+80
-5
lines changedLines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
419 | 468 | | |
420 | 469 | | |
421 | 470 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
150 | 154 | | |
151 | 155 | | |
152 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3443 | 3443 | | |
3444 | 3444 | | |
3445 | 3445 | | |
3446 | | - | |
| 3446 | + | |
| 3447 | + | |
3447 | 3448 | | |
3448 | 3449 | | |
3449 | 3450 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
391 | | - | |
| 391 | + | |
| 392 | + | |
392 | 393 | | |
393 | 394 | | |
394 | 395 | | |
| |||
601 | 602 | | |
602 | 603 | | |
603 | 604 | | |
604 | | - | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
605 | 608 | | |
606 | | - | |
607 | 609 | | |
608 | 610 | | |
609 | 611 | | |
| |||
771 | 773 | | |
772 | 774 | | |
773 | 775 | | |
774 | | - | |
| 776 | + | |
| 777 | + | |
775 | 778 | | |
776 | 779 | | |
777 | 780 | | |
| |||
0 commit comments