Skip to content
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

"Sticky" not working in Firefox extension content script #447

Open
morninj opened this issue Jun 4, 2015 · 4 comments
Open

"Sticky" not working in Firefox extension content script #447

morninj opened this issue Jun 4, 2015 · 4 comments

Comments

@morninj
Copy link

morninj commented Jun 4, 2015

I built a Chrome extension that injects the Ink CSS and JS into certain pages that the user views. It works wonderfully. But now I'm trying to port the extension to Firefox, and I can't get Ink to work.

I'm injecting the Ink JS using a content script. When I run cfx run to test the extension, I get this error:

Object
  - prototype Object
console.warn: [extension name]: Sticky_1 was not correctly created.
console.warn: [extension name]: You called a method on an incorrectly instantiated Sticky_1 component. Check the warnings above to see what went wrong.
@fabiosantoscode
Copy link
Contributor

Hello, and sorry for the delay!

That message shows up when an exception occurs in the _init method of UI components. So Sticky.prototype._init must be throwing an exception somewhere. Could you try to wrap it in a try..catch, and log the error?

Also, what options are you using?

@morninj
Copy link
Author

morninj commented Jun 17, 2015

I'm using autoload.js. I'm trying to catch any errors with window.onerror, but nothing appears.

Here's my .ink-sticky element:

<nav class="ink-navigation ink-sticky" data-offset-top="4">

Thanks!

@fabiosantoscode
Copy link
Contributor

fabiosantoscode commented Jun 17, 2015 via email

@fabiosantoscode
Copy link
Contributor

I'll give it a try later today and tell you how it went.

I'm sorry, but I can't find the time to learn how to do this. Could you try to modify ink-all by wrapping Sticky's _init method in a try..catch and logging the exception and stack for me? I should be able to tell what went wrong and devise a fix for Firefox extensions then.

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

No branches or pull requests

2 participants