Skip to content

JsObject(HTMLDocument) not converted to HtmlDocument #17330

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

Closed
DartBot opened this issue Mar 7, 2014 · 3 comments
Closed

JsObject(HTMLDocument) not converted to HtmlDocument #17330

DartBot opened this issue Mar 7, 2014 · 3 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-duplicate Closed in favor of an existing report library-js

Comments

@DartBot
Copy link

DartBot commented Mar 7, 2014

This issue was originally filed by @DisDis


My chrome extension contains:
background.html
page1.html

background page registers javascript function "Page1.init"(pageDoc):
js.context["Page1"] = new js.JsObject.jsify({
    "init": (param1,param2,param3) {
       print("Page1.init($param1 ${param1.runtimeType})");
        new UIPage1(param1);
    }
 });

page1 - get background window (used chrome.runtime.getBackgroundPage) and execute bw.Page1.init(document).
function initPage(){
  chrome.runtime.getBackgroundPage(function(bw){
   bw.Page1.init(document);
  });
}

Real background log:
Page1.init([object HTMLDocument] JsObject)

Expect:
Page1.init(Instance of 'HtmlDocument' HtmlDocument)

Sample extension source code:
https://github.com/DisDis/JsOToHtmlDoc

@peter-ahe-google
Copy link
Contributor

Added Area-Library, Library-JS, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Mar 7, 2014

This comment was originally written by dev...@futureperfect.info


This looks to me like another instance of:
https://code.google.com/p/dart/issues/detail?id=15053

Any of the white-listed types coming from the background script in Chrome Apps or Extensions arrive as JsObject proxies due to this language interop security nonsense. Language interop and security are two disjointed concepts.

@justinfagnani
Copy link
Contributor

Added Duplicate label.
Marked as being merged into #15053.

@DartBot DartBot added Type-Defect area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-js closed-duplicate Closed in favor of an existing report labels Mar 7, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-duplicate Closed in favor of an existing report library-js
Projects
None yet
Development

No branches or pull requests

4 participants