Git Product home page Git Product logo

mdn / addon-sdk-content-scripts Goto Github PK

View Code? Open in Web Editor NEW
23.0 23.0 10.0 73 KB

DEPRECATED | Use WebExtensions instead | Add-ons demonstrating how to use content scripts in the Add-on SDK.

Home Page: https://developer.mozilla.org/en-US/Add-ons/SDK

License: Creative Commons Zero v1.0 Universal

JavaScript 86.64% HTML 13.36%
contentscript deprecated javascript mdn-docs page-mod sdk unmaintained

addon-sdk-content-scripts's Introduction

MDN Web Docs on Github

👋 Welcome, Bienvenida, 欢迎, Bienvenue, いらっしゃいませ, Receber, Добро пожаловать, 환영합니다, მოგესალმებით

github-profile

Welcome to the mdn repository which we use to track MDN team work. The MDN teams public projects are here, where you can view current and upcoming tasks.

This repository is also used for requests and contains issue templates for the following processes:

Invited experts

Joshua Chen

  • GitHub
  • Invited expert: JavaScript

Hidde de Vries

  • GitHub
  • Invited expert: Accessibility

Scott O'Hara

  • GitHub
  • Invited expert: Accessibility

André Jaenisch

Mendy Berger

NOTE: If you wish to nominate someone to be considered as an invited expert, start by filing an issue in this repository.

addon-sdk-content-scripts's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

addon-sdk-content-scripts's Issues

page-worker-x-domain-iframes example no longer works

Hi,

After converting package.json to work with jpm (new version attached) I get the following error from the example.

I was trying this example because I was attempting similar functionality in an add-on that I am working on and it led me to suspect that the permissions/cross-domain-content key was being ignored in Firefox 40+.

I found that this example fails in the same way, i.e. an iframe with a src that is explicitly allowed as per the package.json entry does not load, and iframe.contentDocument is null (or not allowed).

Is it possible to update the example to work, so I can see how it should work, or is it a bug in Firefox that needs fixing?

Thanks

Error

page-worker-x-domain-iframes:Error: Permission denied to access property "document"
Stack trace:
@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js -> resource://jid1-znbofqt8hrykrq-at-jetpack/data/page-script.js:3:5

package.json updated for jpm

{
   "name": "page-worker-x-domain-iframes",
   "title": "page-worker-x-domain-iframes",
   "id": "jid1-ZNBOfQt8HRykrQ@jetpack",
   "description": "a basic add-on",
   "author": "",
   "license": "MPL 2.0",
   "version": "0.1.0",
   "main": "lib/main.js",
   "permissions": {
      "cross-domain-content": ["http://en.m.wikipedia.org/"]
   }
}

How to run these tests?

Hi Will, it's great to have all these example sources available!
I am curious how to run the tests that accompany them.
I am familiar how to write/run mochitest in the gecko-dev codebase, I am just missing a bit of context how you might run these.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.