-
Notifications
You must be signed in to change notification settings - Fork 17
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
Should implement constructor in WebIDL. #70
Comments
@yjaeseok Are you interested in this issue? |
Yes I am interested in this issue, But i have some question. Calculator has only function (looks like static function), so user do not want to use constructor as class. |
Hi, @yjaeseok [
Constructor,
Constructor(double createdTime)
]
interface Calculator {
static void print();
double add(double number1, double number2);
...
}; Then, our generator should generate glue codes(bridge codes) and then it should eventually call class Calculator {
public:
Calculator() {
...
}
Calculator(double created_time) {
...
}
}; Yes, we might need variables and inheritance but it's not ready yet. We can implement them incrementally. :) |
Hmm.. |
How could I get constructor value in template_cpp.njk file? I think i have to modify idls.ts for idl parsing, but i do not understand how to access constructor parameter like member_info variable. there is no member_info definition in any files. |
We might need a new data structure.
Also, you can get the information from raw_idl_info.extAttrs. |
We need to implement constructor in WebIDL. So I just implement simple constructor. But we need to implement method overloading mechanism. I refer to W3C Spec ISSUE=#70
The issue is closed. |
We need to implement constructor in WebIDL. So I just implement simple constructor. But we need to implement method overloading mechanism. I refer to W3C Spec ISSUE=#70
In the current implementation, we allow to create object in JS side although there is no constructor definition in WebIDL. It's seems a bug. We should allow to create object with constructor in JS side only if there is an explicit constructor in WebIDL level. To resolve the issue, we should implement constructor feature.
The text was updated successfully, but these errors were encountered: