Skip to content
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.

getFrecentSites api #46

Open
wants to merge 34 commits into
base: WebIDL
Choose a base branch
from
Open

getFrecentSites api #46

wants to merge 34 commits into from

Conversation

k88hudson
Copy link

It's working! Needs cleanup though

sarracini and others added 26 commits November 19, 2015 10:26
change currentEngine to getCurrentEngine()
* 'WebIDL' of github.com:mozilla/newtab-dev:
  fix object reference for getCurrentEngine
  disable _storeEngine temporarily
* 'WebIDL' of github.com:mozilla/newtab-dev:
  restore __storeEngine
  Fix getCurrentEngine (add yield)
@k88hudson
Copy link
Author

cc @marcoscaceres

@marcoscaceres
Copy link
Contributor

At first glance, this looks good to me.

});
},

_send(data) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, question I have here (maybe also for @oyiptong)... what's the advantage of using WebChannel.jsm over PromiseMessage? I see that WebChannel.js integrates with the security manager, which is kinda need. Would love to coordindate with @vladikoff a bit here to figure out what would be the best approach - or perhaps y'all already figured all that out in my absence, which would be great (I hate thinking!:)).

I could be mistaken, but the thing that worries me about WebChannel.jsm is that we are again sending CustomEvents back to Web Content? Or is that not what is happening in WebChannel.jsm. The idea behind using the IDL is that we no longer send custom events and allow for more sophisticated APIs that don't rely solely on events being sent to/from content (while benefiting from the WebIDL binding to perform the per-origin security check).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably won't need WebChannel.jsm because it solves the problem of communication between tabs and the browser. You already have that figured out.

I could be mistaken, but the thing that worries me about WebChannel.jsm is that we are again sending CustomEvents back to Web Content? Or is that not what is happening in WebChannel.jsm. The idea behind using the IDL is that we no longer send custom events and allow for more sophisticated APIs that don't rely solely on events being sent to/from content (while benefiting from the WebIDL binding to perform the per-origin security check).

Exactly, with WebIDL you should not need it. That's my response at the first glance, I don't have the knowledge of all your plans here though :)

@oyiptong
Copy link
Contributor

We're not using WebIDL for now for the remote newtab page for the following reasons:

  • It doesn't save us much in terms of code
  • It adds a bureaucratic step in terms of shipping code: we need a review by a DOM peer
  • Our plans include possibly shipping a system addon. Binary system addons haven't been done yet, and I'm not sure if it's possible to ship IDL definitions in an addon

When our API surface becomes more solid, we may consider using WebIDL. But it looks like it doesn't buy us much for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants